mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 19:34:09 +01:00
Give PlayerInteractAtEntityEvent its own handler list, seperating it from PlayerInteractEntityEvent
By: Thinkofdeath <thinkofdeath@spigotmc.org>
This commit is contained in:
parent
10326b1b1c
commit
c466a567c7
1 changed files with 11 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue