mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-24 17:22:55 +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.Entity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.event.HandlerList;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -9,6 +10,7 @@ import org.bukkit.util.Vector;
|
||||||
* with a location on the entity the was clicked.
|
* with a location on the entity the was clicked.
|
||||||
*/
|
*/
|
||||||
public class PlayerInteractAtEntityEvent extends PlayerInteractEntityEvent {
|
public class PlayerInteractAtEntityEvent extends PlayerInteractEntityEvent {
|
||||||
|
private static final HandlerList handlers = new HandlerList();
|
||||||
private final Vector position;
|
private final Vector position;
|
||||||
|
|
||||||
public PlayerInteractAtEntityEvent(Player who, Entity clickedEntity, Vector position) {
|
public PlayerInteractAtEntityEvent(Player who, Entity clickedEntity, Vector position) {
|
||||||
|
@ -19,4 +21,13 @@ public class PlayerInteractAtEntityEvent extends PlayerInteractEntityEvent {
|
||||||
public Vector getClickedPosition() {
|
public Vector getClickedPosition() {
|
||||||
return position.clone();
|
return position.clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HandlerList getHandlers() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static HandlerList getHandlerList() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue