Give PlayerInteractAtEntityEvent its own handler list, seperating it from PlayerInteractEntityEvent

By: Thinkofdeath <thinkofdeath@spigotmc.org>
This commit is contained in:
Bukkit/Spigot 2014-12-02 22:41:22 +00:00
parent 10326b1b1c
commit c466a567c7

View file

@ -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;
}
}