Call PlayerLaunchProjectileEvent for trident (#8027)

This commit is contained in:
Lulu13022002 2022-11-03 19:43:50 +01:00 committed by GitHub
parent e30b082262
commit ebc0f6bfb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 3 deletions

View file

@ -6,10 +6,10 @@ Subject: [PATCH] PlayerLaunchProjectileEvent
diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerLaunchProjectileEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerLaunchProjectileEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..9074b2ede01f76c0560e5318246382163cc91591
index 0000000000000000000000000000000000000000..5450575459f2d95be93db5a8c6d4d88c69deb2ec
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerLaunchProjectileEvent.java
@@ -0,0 +1,83 @@
@@ -0,0 +1,87 @@
+package com.destroystokyo.paper.event.player;
+
+import org.bukkit.entity.Player;
@ -21,7 +21,11 @@ index 0000000000000000000000000000000000000000..9074b2ede01f76c0560e531824638216
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * Called when a player shoots a projectile
+ * Called when a player shoots a projectile.
+ * <p>
+ * Notably this event is not called for arrows as the player does not launch them, rather shoots them with the help
+ * of a bow or crossbow. A plugin may listen to {@link org.bukkit.event.entity.EntityShootBowEvent} for these actions
+ * instead.
+ */
+public class PlayerLaunchProjectileEvent extends PlayerEvent implements Cancellable {
+ private static final HandlerList handlers = new HandlerList();