Handle armorstands interaction for commands
This commit is contained in:
parent
111acda388
commit
9a40df5bd8
@ -496,6 +496,21 @@ public class DisguiseListener implements Listener {
|
||||
interactions.remove(p.getName()).onInteract(p, entity);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onRightClick(PlayerInteractAtEntityEvent event) {
|
||||
Player p = event.getPlayer();
|
||||
|
||||
if (!interactions.containsKey(p.getName())) {
|
||||
return;
|
||||
}
|
||||
|
||||
event.setCancelled(true);
|
||||
disguiseRunnable.remove(p.getName()).cancel();
|
||||
|
||||
Entity entity = event.getRightClicked();
|
||||
interactions.remove(p.getName()).onInteract(p, entity);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onTarget(EntityTargetEvent event) {
|
||||
if (event.getTarget() == null) {
|
||||
|
Loading…
Reference in New Issue
Block a user