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

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

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

miscJava/bukkit-minecraft-plugins/HoerupUtils/src/dk/thoerup/bukkit/hoeruputils/secretdoor/Door.java revision 1581 by torben, Sun Jul 24 17:23:48 2011 UTC miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/secretdoor/Door.java revision 1684 by torben, Fri Jan 27 12:21:27 2012 UTC
# Line 27  class Door { Line 27  class Door {
27          private int height;          private int height;
28    
29          private String owner;          private String owner;
30    
31            private boolean isPrivate;
32                    
33    
34          public Door(Block sign, int width, int height, DoorStorage store, String owner) throws ConflictingDoorException{          public Door(Block sign, int width, int height, DoorStorage store, String owner, boolean isPrivate) throws ConflictingDoorException{
35                  leftUpper = sign.getLocation().clone();                  leftUpper = sign.getLocation().clone();
36                                    
37                  this.width = width;                  this.width = width;
38                  this.height = height;                  this.height = height;
39    
40                  this.owner = owner;                  this.owner = owner;
41    
42                    this.isPrivate = isPrivate;
43                                    
44    
45                  direction = sign.getData() - 2;                  direction = sign.getData() - 2;
# Line 73  class Door { Line 77  class Door {
77    
78          }          }
79    
80    /*
81            @Deprecated
82          public Door(String input, Server server) {          public Door(String input, Server server) {
83                  String parts[] = input.split(":");                  String parts[] = input.split(":");
84    
# Line 88  class Door { Line 94  class Door {
94    
95                                    
96                  loadBlocks();                  loadBlocks();
97            }*/
98    
99            public Door(Location loc, int direction, int width, int height, String owner, boolean isPrivate) {
100                    leftUpper = loc;
101                    this.direction = direction;
102                    this.width = width;
103                    this.height = height;
104                    this.owner = owner;
105                    this.isPrivate = isPrivate;
106    
107                    loadBlocks();
108          }          }
109    
110            
111    
112          public void powerChange(World world, int oldCurrent, int newCurrent ) {          public void powerChange(World world, int oldCurrent, int newCurrent ) {
113                  if (isPowered() == true) {                  if (isPowered() == true) {
114                          open();                          open();
# Line 151  class Door { Line 170  class Door {
170                                    
171          }          }
172    
173          public String toCsv() {  /*      public String toCsv() {
174                  StringBuilder sb = new StringBuilder();                  StringBuilder sb = new StringBuilder();
175                  sb.append( leftUpper.getWorld().getName() );                  sb.append( leftUpper.getWorld().getName() );
176    
# Line 168  class Door { Line 187  class Door {
187                  sb.append( ":" + owner);                  sb.append( ":" + owner);
188    
189                  return sb.toString();                  return sb.toString();
190          }          }*/
191    
192    
193          public void registerMap(Map<Location,Door> map) {          public void registerMap(Map<Location,Door> map) {
# Line 211  class Door { Line 230  class Door {
230                  return owner;                  return owner;
231          }          }
232    
233            public Location getLeftUpper() {
234                    return leftUpper;
235            }
236    
237            public int getWidth() {
238                    return width;
239            }
240    
241            public int getHeight() {
242                    return height;
243            }
244    
245            public int getDirection() {
246                    return direction;
247            }
248    
249            public boolean isPrivate() {
250                    return isPrivate;
251            }
252    
253  }  }

Legend:
Removed from v.1581  
changed lines
  Added in v.1684

  ViewVC Help
Powered by ViewVC 1.1.20