--- miscJava/bukkit-minecraft-plugins/HoerupUtils/src/dk/thoerup/bukkit/hoeruputils/secretdoor/Door.java 2011/07/24 17:23:48 1581 +++ miscJava/bukkit-minecraft-plugins/HoerupUtils/src/dk/thoerup/bukkit/hoeruputils/secretdoor/Door.java 2011/10/01 15:21:07 1605 @@ -27,15 +27,19 @@ private int height; private String owner; + + private boolean isPrivate; - 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{ leftUpper = sign.getLocation().clone(); this.width = width; this.height = height; this.owner = owner; + + this.isPrivate = isPrivate; direction = sign.getData() - 2; @@ -73,6 +77,8 @@ } +/* + @Deprecated public Door(String input, Server server) { String parts[] = input.split(":"); @@ -88,8 +94,21 @@ loadBlocks(); + }*/ + + public Door(Location loc, int direction, int width, int height, String owner, boolean isPrivate) { + leftUpper = loc; + this.direction = direction; + this.width = width; + this.height = height; + this.owner = owner; + this.isPrivate = isPrivate; + + loadBlocks(); } + + public void powerChange(World world, int oldCurrent, int newCurrent ) { if (isPowered() == true) { open(); @@ -151,7 +170,7 @@ } - public String toCsv() { +/* public String toCsv() { StringBuilder sb = new StringBuilder(); sb.append( leftUpper.getWorld().getName() ); @@ -168,7 +187,7 @@ sb.append( ":" + owner); return sb.toString(); - } + }*/ public void registerMap(Map map) { @@ -211,4 +230,24 @@ return owner; } + public Location getLeftUpper() { + return leftUpper; + } + + public int getWidth() { + return width; + } + + public int getHeight() { + return height; + } + + public int getDirection() { + return direction; + } + + public boolean isPrivate() { + return isPrivate; + } + }