From c466a567c7d720333b656f5b6e2417ceb95d35aa Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Tue, 2 Dec 2014 22:41:22 +0000 Subject: [PATCH] Give PlayerInteractAtEntityEvent its own handler list, seperating it from PlayerInteractEntityEvent By: Thinkofdeath --- .../event/player/PlayerInteractAtEntityEvent.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerInteractAtEntityEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerInteractAtEntityEvent.java index db5678eec6..3293b115e4 100644 --- a/paper-api/src/main/java/org/bukkit/event/player/PlayerInteractAtEntityEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerInteractAtEntityEvent.java @@ -2,6 +2,7 @@ package org.bukkit.event.player; import org.bukkit.entity.Entity; import org.bukkit.entity.Player; +import org.bukkit.event.HandlerList; import org.bukkit.util.Vector; /** @@ -9,6 +10,7 @@ import org.bukkit.util.Vector; * with a location on the entity the was clicked. */ public class PlayerInteractAtEntityEvent extends PlayerInteractEntityEvent { + private static final HandlerList handlers = new HandlerList(); private final Vector position; public PlayerInteractAtEntityEvent(Player who, Entity clickedEntity, Vector position) { @@ -19,4 +21,13 @@ public class PlayerInteractAtEntityEvent extends PlayerInteractEntityEvent { public Vector getClickedPosition() { return position.clone(); } + + @Override + public HandlerList getHandlers() { + return handlers; + } + + public static HandlerList getHandlerList() { + return handlers; + } }