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

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

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

revision 1776 by torben, Thu Apr 5 12:57:33 2012 UTC revision 1779 by torben, Thu Apr 5 14:27:24 2012 UTC
# Line 91  public class SnitchingChest  implements Line 91  public class SnitchingChest  implements
91                  }                  }
92                                    
93                  SnitchingChestBean chest1 = createChest(player.getName(), "", loc);                  SnitchingChestBean chest1 = createChest(player.getName(), "", loc);
                 //chestMap.put(loc, chest1);  
94                  addChest(loc, chest1);                  addChest(loc, chest1);
95                  if (loc2 != null) {                  if (loc2 != null) {
96                                                    
97                          SnitchingChestBean chest2 = createChest (player.getName(), "", loc2);                          SnitchingChestBean chest2 = createChest (player.getName(), "", loc2);
98                          addChest(loc, chest2);                          addChest(loc, chest2);
                         //chestMap.put(loc2, chest2 );  
99                  }                  }
100                    
101                  player.sendMessage("[SnitchingChest] Chest is now under surveillance");                  player.sendMessage("[SnitchingChest] Chest is now under surveillance");
# Line 127  public class SnitchingChest  implements Line 125  public class SnitchingChest  implements
125                    
126          void removeChest(Location loc) {          void removeChest(Location loc) {
127                  SnitchingChestBean chest = chestMap.remove(loc);                  SnitchingChestBean chest = chestMap.remove(loc);
128                  plugin.getDatabase().delete(chest);                  if (chest != null) {
129                            plugin.getDatabase().delete(chest);
130                    }
131          }          }
132                    
133          void loadChests() {                      void loadChests() {            
# Line 200  public class SnitchingChest  implements Line 200  public class SnitchingChest  implements
200                  } else {                  } else {
201                          loc =  ( (DoubleChest)holder).getLocation();                          loc =  ( (DoubleChest)holder).getLocation();
202                  }                  }
203                    
204                    loc.setX( loc.getBlockX() ); //round to integer, since double chests apparently are placed at pos + 0.5
205                    loc.setZ( loc.getBlockZ() ); // -- // --
206                    
207                  return loc;                  return loc;
208          }          }
209                    

Legend:
Removed from v.1776  
changed lines
  Added in v.1779

  ViewVC Help
Powered by ViewVC 1.1.20