--- miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/chests/AdvancedChest.java 2012/09/23 18:56:24 1851 +++ miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/chests/AdvancedChest.java 2012/10/02 09:16:21 1852 @@ -140,6 +140,10 @@ } if (cmd.equals("remove")) { + 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); @@ -154,6 +158,10 @@ player.sendMessage("This chest is not protected"); return true; } + if (! chest.getOwner().equals( player.getName() ) ) { + player.sendMessage("You can not add/remove players from a chest you don't own"); + return true; + } if (args.length != 2) { player.sendMessage("You need to specify which player to add or remove"); return true;