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

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

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

revision 1768 by torben, Tue Apr 3 20:21:02 2012 UTC revision 1769 by torben, Tue Apr 3 20:23:59 2012 UTC
# Line 188  public class SnitchingChest  implements Line 188  public class SnitchingChest  implements
188                  InventoryHolder holder = event.getInventory().getHolder();                  InventoryHolder holder = event.getInventory().getHolder();
189                  if (holder instanceof Chest || holder instanceof DoubleChest) {                  if (holder instanceof Chest || holder instanceof DoubleChest) {
190                          Location loc = getChestLocation(holder);                          Location loc = getChestLocation(holder);
191                            String owner = chestMap.get(loc);
192                            
193                                                    
194                          Player player = (Player) event.getPlayer();                          Player player = (Player) event.getPlayer();
195                                                    
# Line 217  public class SnitchingChest  implements Line 219  public class SnitchingChest  implements
219                                  int diff = Math.abs( savedcount - count);                                  int diff = Math.abs( savedcount - count);
220                                                                    
221                                  if (count > savedcount) {                                  if (count > savedcount) {
222                                          String msg = player.getName() + " added " + diff + " units of " + item ;                                          String msg = player.getName() + " added " + diff + " units of " + item + " to " + owner + "'s chest";
223                                          plugin.getLogger().info(msg);                                          plugin.getLogger().info(msg);
224                                  }                                  }
225                                  if (count < savedcount) {                                  if (count < savedcount) {
226                                          String msg = player.getName() + " removed " + diff + " units of " + item " from ";                                          String msg = player.getName() + " removed " + diff + " units of " + item + " from " + owner + "'s chest";
227                                          plugin.getLogger().info(msg);                                          plugin.getLogger().info(msg);
228                                  }                                  }
229                                                                    

Legend:
Removed from v.1768  
changed lines
  Added in v.1769

  ViewVC Help
Powered by ViewVC 1.1.20