--- miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/chests/AdvancedChest.java 2012/10/02 09:16:21 1852 +++ miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/chests/AdvancedChest.java 2012/10/02 16:40:56 1853 @@ -140,16 +140,18 @@ } if (cmd.equals("remove")) { + if (chest == null) { + player.sendMessage("This chest is not protected"); + return true; + } if (! chest.getOwner().equals( player.getName() ) ) { player.sendMessage("You can not remove lock from a chest you don't own"); return true; } - if (chest != null) { - player.sendMessage("[LockedChest] Removing protection from chest"); - removeChest(loc); - } else { - player.sendMessage("This chest is not protected"); - } + + player.sendMessage("[LockedChest] Removing protection from chest"); + removeChest(loc); + return true; }