/[projects]/miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/chests/AdvancedChest.java
ViewVC logotype

Diff of /miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/chests/AdvancedChest.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1810 by torben, Mon Jun 4 18:27:14 2012 UTC revision 1852 by torben, Tue Oct 2 09:16:21 2012 UTC
# Line 140  public class AdvancedChest  implements L Line 140  public class AdvancedChest  implements L
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);                              
# Line 154  public class AdvancedChest  implements L Line 158  public class AdvancedChest  implements L
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;
# Line 265  public class AdvancedChest  implements L Line 273  public class AdvancedChest  implements L
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                    
# Line 403  public class AdvancedChest  implements L Line 411  public class AdvancedChest  implements L
411                                  }                                  }
412    
413    
414                                                            server.getLogger().info( "[AdvancedChest] " + event.getPlayer().getName() + " tried opening a chest owned by " + chest.getOwner() );
415                                  player.sendMessage( ChatColor.BLUE +  "Sorry but this chest is locked !");                                  player.sendMessage( ChatColor.BLUE +  "Sorry but this chest is locked !");
416                                  event.setCancelled(true);                                  event.setCancelled(true);
417                          }                          }
# Line 513  public class AdvancedChest  implements L Line 521  public class AdvancedChest  implements L
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                                                                    

Legend:
Removed from v.1810  
changed lines
  Added in v.1852

  ViewVC Help
Powered by ViewVC 1.1.20