Fix modify entity command

This commit is contained in:
libraryaddict 2017-06-27 14:45:42 +12:00
parent 59a73ffcd2
commit 23c012d0e3
2 changed files with 6 additions and 4 deletions

View File

@ -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();

View File

@ -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()));