44 |
File f2 = new File( plugin.getDataFolder(), "secretdoors.yml"); |
File f2 = new File( plugin.getDataFolder(), "secretdoors.yml"); |
45 |
YamlConfiguration config = new YamlConfiguration(); |
YamlConfiguration config = new YamlConfiguration(); |
46 |
|
|
47 |
int count = 0; |
|
48 |
for (int i=0; i<doors.size(); i++) { |
for (int i=0; i<doors.size(); i++) { |
49 |
Door door = doors.get(i); |
Door door = doors.get(i); |
50 |
|
|
56 |
config.set( i + ".width", door.getWidth() ); |
config.set( i + ".width", door.getWidth() ); |
57 |
config.set( i + ".height", door.getHeight() ); |
config.set( i + ".height", door.getHeight() ); |
58 |
config.set( i + ".owner", door.getOwner() ); |
config.set( i + ".owner", door.getOwner() ); |
59 |
config.set( i + ".private", door.isPrivate() ); |
config.set( i + ".private", door.isPrivate() ); |
60 |
|
config.set( i + ".password", door.getPassword() ); |
61 |
} |
} |
62 |
|
|
63 |
try { |
try { |
102 |
String owner = config.getString( key + ".owner"); |
String owner = config.getString( key + ".owner"); |
103 |
|
|
104 |
boolean isPrivate = config.getBoolean( key + ".private", false); |
boolean isPrivate = config.getBoolean( key + ".private", false); |
105 |
|
String password = config.getString( key + ".password", ""); |
106 |
|
|
107 |
Door door = new Door(loc, direction, width, height, owner, isPrivate); |
Door door = new Door(loc, direction, width, height, owner, isPrivate, password); |
108 |
doors.add( door ); |
doors.add( door ); |
109 |
door.registerMap(doormap); |
door.registerMap(doormap); |
110 |
} |
} |