--- miscJava/bukkit-minecraft-plugins/HoerupUtils/src/dk/thoerup/bukkit/hoeruputils/secretdoor/Door.java 2011/06/27 19:43:33 1534 +++ miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/secretdoor/Door.java 2013/01/13 13:05:16 1912 @@ -2,6 +2,7 @@ import java.util.Map; +import org.bukkit.Material; import org.bukkit.Location; import org.bukkit.Server; import org.bukkit.World; @@ -14,26 +15,36 @@ final static int NORTH = 2; final static int SOUTH = 3; - Location leftUpper; + private Location leftUpper; - Location blocks[][]; // [width][height] - [0][0] == leftUpper - - int material; + private Location blocks[][]; // [width][height] - [0][0] == leftUpper + private int material[][]; + private byte data[][]; + + private int direction; - int direction; + private int width; + private int height; + + private String owner; + + private boolean isPrivate; - int width; - int height; + private String password; - public Door(Block sign, int width, int height, DoorStorage store) throws ConflictingDoorException{ + public Door(Block sign, int width, int height, DoorStorage store, String owner, boolean isPrivate, String password) throws ConflictingDoorException{ leftUpper = sign.getLocation().clone(); this.width = width; this.height = height; + + this.owner = owner; + + this.isPrivate = isPrivate; + this.password = password; - blocks = new Location[width][height]; direction = sign.getData() - 2; @@ -54,11 +65,11 @@ - material = leftUpper.getBlock().getTypeId(); + //material = leftUpper.getBlock().getTypeId(); loadBlocks(); - + for (int w=0; w map) { @@ -155,21 +212,52 @@ } - public void open(World world) { + public void open() { for (int w=0; w