140 |
} |
} |
141 |
|
|
142 |
if (cmd.equals("remove")) { |
if (cmd.equals("remove")) { |
143 |
|
if (! chest.getOwner().equals( player.getName() ) ) { |
144 |
|
player.sendMessage("You can not remove lock from a chest you don't own"); |
145 |
|
return true; |
146 |
|
} |
147 |
if (chest != null) { |
if (chest != null) { |
148 |
player.sendMessage("[LockedChest] Removing protection from chest"); |
player.sendMessage("[LockedChest] Removing protection from chest"); |
149 |
removeChest(loc); |
removeChest(loc); |
158 |
player.sendMessage("This chest is not protected"); |
player.sendMessage("This chest is not protected"); |
159 |
return true; |
return true; |
160 |
} |
} |
161 |
|
if (! chest.getOwner().equals( player.getName() ) ) { |
162 |
|
player.sendMessage("You can not add/remove players from a chest you don't own"); |
163 |
|
return true; |
164 |
|
} |
165 |
if (args.length != 2) { |
if (args.length != 2) { |
166 |
player.sendMessage("You need to specify which player to add or remove"); |
player.sendMessage("You need to specify which player to add or remove"); |
167 |
return true; |
return true; |