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 |
|
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; |
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 |
} |
} |
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 |
|
|
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 |
} |
} |