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; |
28 |
private int height; |
private int height; |
29 |
|
|
30 |
private String owner; |
private String owner; |
31 |
|
|
32 |
|
private boolean isPrivate; |
33 |
|
|
34 |
|
|
35 |
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{ |
36 |
leftUpper = sign.getLocation().clone(); |
leftUpper = sign.getLocation().clone(); |
37 |
|
|
38 |
this.width = width; |
this.width = width; |
39 |
this.height = height; |
this.height = height; |
40 |
|
|
41 |
this.owner = owner; |
this.owner = owner; |
42 |
|
|
43 |
|
this.isPrivate = isPrivate; |
44 |
|
|
45 |
|
|
46 |
direction = sign.getData() - 2; |
direction = sign.getData() - 2; |
97 |
loadBlocks(); |
loadBlocks(); |
98 |
}*/ |
}*/ |
99 |
|
|
100 |
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) { |
101 |
leftUpper = loc; |
leftUpper = loc; |
102 |
this.direction = direction; |
this.direction = direction; |
103 |
this.width = width; |
this.width = width; |
104 |
this.height = height; |
this.height = height; |
105 |
this.owner = owner; |
this.owner = owner; |
106 |
|
this.isPrivate = isPrivate; |
107 |
|
|
108 |
loadBlocks(); |
loadBlocks(); |
109 |
} |
} |
211 |
public void open() { |
public void open() { |
212 |
for (int w=0; w<width; w++) { |
for (int w=0; w<width; w++) { |
213 |
for (int h=0; h<height; h++) { |
for (int h=0; h<height; h++) { |
214 |
blocks[w][h].getBlock().setTypeId(0, false); |
//blocks[w][h].getBlock().setTypeId( 0, false); |
215 |
|
blocks[w][h].getBlock().setType( Material.AIR ); |
216 |
} |
} |
217 |
} |
} |
218 |
|
|
248 |
return direction; |
return direction; |
249 |
} |
} |
250 |
|
|
251 |
|
public boolean isPrivate() { |
252 |
|
return isPrivate; |
253 |
|
} |
254 |
|
|
255 |
} |
} |