Give errors when they attempt to use misc disguise on living entities with commands

This commit is contained in:
libraryaddict
2014-05-23 08:22:07 +12:00
parent 72d07e7f62
commit b44aba87d4
3 changed files with 51 additions and 27 deletions

View File

@@ -52,6 +52,11 @@ public class DisguisePlayerCommand extends BaseDisguiseCommand {
}
return true;
}
if (disguise.isMiscDisguise() && !DisguiseConfig.isMiscDisguisesForLivingEnabled()) {
sender.sendMessage(ChatColor.RED
+ "Can't disguise a living entity as a misc disguise. This has been disabled in the config!");
return true;
}
if (DisguiseConfig.isNameOfPlayerShownAboveDisguise()) {
if (disguise.getWatcher() instanceof LivingWatcher) {
((LivingWatcher) disguise.getWatcher()).setCustomName(((Player) player).getDisplayName());