diff --git a/src/me/libraryaddict/disguise/DisguiseListener.java b/src/me/libraryaddict/disguise/DisguiseListener.java index 2e798607..34ea1e35 100644 --- a/src/me/libraryaddict/disguise/DisguiseListener.java +++ b/src/me/libraryaddict/disguise/DisguiseListener.java @@ -417,13 +417,13 @@ public class DisguiseListener implements Listener { @EventHandler public void onRightClick(PlayerInteractEntityEvent event) { - if (!disguiseEntity.containsKey(event.getPlayer().getName()) && !disguiseClone - .containsKey(event.getPlayer().getName())) { + Player p = event.getPlayer(); + + if (!disguiseEntity.containsKey(p.getName()) && !disguiseClone.containsKey(p.getName()) && !disguiseModify + .containsKey(p.getName())) { return; } - Player p = event.getPlayer(); - event.setCancelled(true); disguiseRunnable.remove(p.getName()).cancel(); diff --git a/src/me/libraryaddict/disguise/commands/DisguiseModifyEntityCommand.java b/src/me/libraryaddict/disguise/commands/DisguiseModifyEntityCommand.java index 6712b24f..b64c103d 100644 --- a/src/me/libraryaddict/disguise/commands/DisguiseModifyEntityCommand.java +++ b/src/me/libraryaddict/disguise/commands/DisguiseModifyEntityCommand.java @@ -39,6 +39,8 @@ public class DisguiseModifyEntityCommand extends DisguiseBaseCommand implements return true; } + // TODO Validate if any disguises have this arg + LibsDisguises.getInstance().getListener().setDisguiseModify(sender.getName(), args); sender.sendMessage(LibsMsg.DMODIFYENT_CLICK.get(DisguiseConfig.getDisguiseEntityExpire()));