mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-11-04 08:59:47 +01:00
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);
|
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
|
@EventHandler
|
||||||
public void onTarget(EntityTargetEvent event) {
|
public void onTarget(EntityTargetEvent event) {
|
||||||
if (event.getTarget() == null) {
|
if (event.getTarget() == null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user