/[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 1873 by torben, Thu Nov 8 19:47:51 2012 UTC revision 1874 by torben, Tue Nov 27 15:38:11 2012 UTC
# Line 137  public class AdvancedChest  implements L Line 137  public class AdvancedChest  implements L
137                                  addChest(loc, chest);                                  addChest(loc, chest);
138                                  player.sendMessage("Chest is now " + modeStr);                                  player.sendMessage("Chest is now " + modeStr);
139                          } else {                          } else {
140                                    server.getLogger().info( player.getName() + " tried to protect a chest owned by " + chest.getOwner() );
141                                  player.sendMessage("This chest is already protected");                                  player.sendMessage("This chest is already protected");
142                          }                          }
143                          return true;                          return true;
# Line 149  public class AdvancedChest  implements L Line 150  public class AdvancedChest  implements L
150                          }                          }
151                          if (! chest.getOwner().equals( player.getName() ) ) {                          if (! chest.getOwner().equals( player.getName() ) ) {
152                                  player.sendMessage("You can not remove lock from a chest you don't own");                                  player.sendMessage("You can not remove lock from a chest you don't own");
153                                    server.getLogger().info( player.getName() + " tried to remove protection froma chest owned by " + chest.getOwner() );
154                                  return true;                                  return true;
155                          }                          }
156    
# Line 165  public class AdvancedChest  implements L Line 167  public class AdvancedChest  implements L
167                          }                          }
168                          if (! chest.getOwner().equals( player.getName() ) ) {                          if (! chest.getOwner().equals( player.getName() ) ) {
169                                  player.sendMessage("You can not set new owner of a chest you dont own");                                  player.sendMessage("You can not set new owner of a chest you dont own");
170                                    server.getLogger().info( player.getName() + " tried to set owner on a chest owned by " + chest.getOwner() );
171                                  return true;                                  return true;
172                          }                          }
173                          if (args.length != 2) {                          if (args.length != 2) {
# Line 189  public class AdvancedChest  implements L Line 192  public class AdvancedChest  implements L
192                          }                          }
193                          if (! chest.getOwner().equals( player.getName() ) ) {                          if (! chest.getOwner().equals( player.getName() ) ) {
194                                  player.sendMessage("You can not add/remove players from a chest you don't own");                                  player.sendMessage("You can not add/remove players from a chest you don't own");
195                                    server.getLogger().info( player.getName() + " tried to add/remove player on a chest owned by " + chest.getOwner() );
196                                  return true;                                  return true;
197                          }                          }
198                          if (args.length != 2) {                          if (args.length != 2) {
# Line 218  public class AdvancedChest  implements L Line 222  public class AdvancedChest  implements L
222                                  player.sendMessage("This chest is not protected");                                  player.sendMessage("This chest is not protected");
223                                  return true;                                  return true;
224                          }                          }
225                          if (! chest.getOwner().equals( player.getName() ) ) {                          if (! chest.getOwner().equals( player.getName() ) ) {                          
226                                  player.sendMessage("You can not comment a chest you don't own");                                  player.sendMessage("You can not comment a chest you don't own");
227                                    server.getLogger().info( player.getName() + " tried to comment on a chest owned by " + chest.getOwner() );
228                                  return true;                                  return true;
229                          }                          }
230    

Legend:
Removed from v.1873  
changed lines
  Added in v.1874

  ViewVC Help
Powered by ViewVC 1.1.20