--- miscJava/bukkit-minecraft-plugins/HoerupUtils/src/dk/thoerup/bukkit/hoeruputils/secretdoor/Door.java 2011/06/27 18:10:05 1532 +++ miscJava/bukkit-minecraft-plugins/HoerupUtils/src/dk/thoerup/bukkit/hoeruputils/secretdoor/Door.java 2011/06/27 19:34:03 1533 @@ -17,19 +17,23 @@ Location leftUpper; - Location blocks[][] = new Location[2][2]; // [width][height] - [0][0] == leftUpper + Location blocks[][]; // [width][height] - [0][0] == leftUpper int material; int direction; - int width = 2; - int height = 2; + int width; + int height; - public Door(Block sign) { + public Door(Block sign, int width, int height) { leftUpper = sign.getLocation().clone(); + this.width = width; + this.height = height; + + blocks = new Location[width][height]; direction = sign.getData() - 2; @@ -64,6 +68,10 @@ leftUpper = new Location(w, Integer.parseInt(parts[1]), Integer.parseInt(parts[2]), Integer.parseInt(parts[3]) ); direction = Integer.parseInt( parts[4] ); material = Integer.parseInt( parts[5] ); + + width = Integer.parseInt( parts[6] ); + height = Integer.parseInt( parts[7] ); + loadBlocks(); } @@ -111,8 +119,10 @@ sb.append( ":" + direction ); - sb.append( ":" + material ); + + sb.append( ":" + width ); + sb.append( ":" + height ); return sb.toString(); }