140 |
} |
} |
141 |
|
|
142 |
if (cmd.equals("remove")) { |
if (cmd.equals("remove")) { |
143 |
if (chest != null) { |
if (chest == null) { |
144 |
player.sendMessage("[LockedChest] Removing protection from chest"); |
player.sendMessage("This chest is not protected"); |
145 |
removeChest(loc); |
return true; |
|
} else { |
|
|
player.sendMessage("This chest is not protected"); |
|
146 |
} |
} |
147 |
|
if (! chest.getOwner().equals( player.getName() ) ) { |
148 |
|
player.sendMessage("You can not remove lock from a chest you don't own"); |
149 |
|
return true; |
150 |
|
} |
151 |
|
|
152 |
|
player.sendMessage("[LockedChest] Removing protection from chest"); |
153 |
|
removeChest(loc); |
154 |
|
|
155 |
return true; |
return true; |
156 |
} |
} |
157 |
|
|
160 |
player.sendMessage("This chest is not protected"); |
player.sendMessage("This chest is not protected"); |
161 |
return true; |
return true; |
162 |
} |
} |
163 |
|
if (! chest.getOwner().equals( player.getName() ) ) { |
164 |
|
player.sendMessage("You can not add/remove players from a chest you don't own"); |
165 |
|
return true; |
166 |
|
} |
167 |
if (args.length != 2) { |
if (args.length != 2) { |
168 |
player.sendMessage("You need to specify which player to add or remove"); |
player.sendMessage("You need to specify which player to add or remove"); |
169 |
return true; |
return true; |
275 |
|
|
276 |
void loadChests() { |
void loadChests() { |
277 |
int count = loadChestsWorker(); |
int count = loadChestsWorker(); |
278 |
plugin.getLogger().info("[AdvancedChest] loaded " + count + " chests"); |
server.getLogger().info("[AdvancedChest] loaded " + count + " chests"); |
279 |
} |
} |
280 |
|
|
281 |
|
|
523 |
} |
} |
524 |
|
|
525 |
|
|
526 |
plugin.getLogger().info(msg); |
server.getLogger().info( "[AdvancedChest]" + msg); |
527 |
plugin.getMessageWrapper().sendMessage("system", owner, msg); |
plugin.getMessageWrapper().sendMessage("system", owner, msg); |
528 |
} |
} |
529 |
|
|