/[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 1604 by torben, Tue Sep 27 18:27:54 2011 UTC miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/secretdoor/Door.java revision 1912 by torben, Sun Jan 13 13:05:16 2013 UTC
# Line 2  package dk.thoerup.bukkit.hoeruputils.se Line 2  package dk.thoerup.bukkit.hoeruputils.se
2    
3  import java.util.Map;  import java.util.Map;
4    
5    import org.bukkit.Material;
6  import org.bukkit.Location;  import org.bukkit.Location;
7  import org.bukkit.Server;  import org.bukkit.Server;
8  import org.bukkit.World;  import org.bukkit.World;
# Line 27  class Door { Line 28  class Door {
28          private int height;          private int height;
29    
30          private String owner;          private String owner;
31    
32            private boolean isPrivate;
33            
34            private String password;
35                    
36    
37          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, String password) throws ConflictingDoorException{
38                  leftUpper = sign.getLocation().clone();                  leftUpper = sign.getLocation().clone();
39                                    
40                  this.width = width;                  this.width = width;
41                  this.height = height;                  this.height = height;
42    
43                  this.owner = owner;                  this.owner = owner;
44    
45                    this.isPrivate = isPrivate;
46                    this.password = password;
47                                    
48    
49                  direction = sign.getData() - 2;                  direction = sign.getData() - 2;
# Line 92  class Door { Line 100  class Door {
100                  loadBlocks();                  loadBlocks();
101          }*/          }*/
102    
103          public Door(Location loc, int direction, int width, int height, String owner) {          public Door(Location loc, int direction, int width, int height, String owner, boolean isPrivate, String password) {
104                  leftUpper = loc;                  leftUpper = loc;
105                  this.direction = direction;                  this.direction = direction;
106                  this.width = width;                  this.width = width;
107                  this.height = height;                  this.height = height;
108                  this.owner = owner;                  this.owner = owner;
109                    this.isPrivate = isPrivate;
110                    this.password = password;
111    
112                  loadBlocks();                  loadBlocks();
113          }          }
# Line 205  class Door { Line 215  class Door {
215          public void open() {          public void open() {
216                  for (int w=0; w<width; w++) {                  for (int w=0; w<width; w++) {
217                          for (int h=0; h<height; h++) {                                                    for (int h=0; h<height; h++) {                          
218                                  blocks[w][h].getBlock().setTypeId(0, false);                                  //blocks[w][h].getBlock().setTypeId( 0, false);
219                                    blocks[w][h].getBlock().setType( Material.AIR );
220                          }                          }
221                  }                  }
222    
# Line 241  class Door { Line 252  class Door {
252                  return direction;                  return direction;
253          }          }
254    
255            public boolean isPrivate() {
256                    return isPrivate;
257            }
258            
259            public String getPassword() {
260                    return password;
261            }
262    
263  }  }

Legend:
Removed from v.1604  
changed lines
  Added in v.1912

  ViewVC Help
Powered by ViewVC 1.1.20