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; |
273 |
|
|
274 |
void loadChests() { |
void loadChests() { |
275 |
int count = loadChestsWorker(); |
int count = loadChestsWorker(); |
276 |
plugin.getLogger().info("[AdvancedChest] loaded " + count + " chests"); |
server.getLogger().info("[AdvancedChest] loaded " + count + " chests"); |
277 |
} |
} |
278 |
|
|
279 |
|
|
521 |
} |
} |
522 |
|
|
523 |
|
|
524 |
plugin.getLogger().info(msg); |
server.getLogger().info( "[AdvancedChest]" + msg); |
525 |
plugin.getMessageWrapper().sendMessage("system", owner, msg); |
plugin.getMessageWrapper().sendMessage("system", owner, msg); |
526 |
} |
} |
527 |
|
|