Let's loop through the signs when saving them to file so we save them
correctly in the flatfile.
This commit is contained in:
parent
e21c2d87ad
commit
f03714a5f7
@ -123,7 +123,14 @@ public class JailIO {
|
|||||||
flat.set(cNode + "chest.z", c.getChestLocation().getBlockZ());
|
flat.set(cNode + "chest.z", c.getChestLocation().getBlockZ());
|
||||||
}
|
}
|
||||||
|
|
||||||
flat.set(cNode + "signs", c.getSigns().toArray(new String[c.getSigns().size()]));
|
String[] signs = new String[c.getSigns().size()];
|
||||||
|
int count = 0;
|
||||||
|
for(SimpleLocation loc : c.getSigns()) {
|
||||||
|
signs[count] = loc.toString();
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
flat.set(cNode + "signs", signs);
|
||||||
|
|
||||||
if(c.getPrisoner() != null) {
|
if(c.getPrisoner() != null) {
|
||||||
Prisoner p = c.getPrisoner();
|
Prisoner p = c.getPrisoner();
|
||||||
|
@ -46,6 +46,7 @@ public class SimpleLocation {
|
|||||||
return new Location(Bukkit.getWorld(world), x, y, z, yaw, pitch);
|
return new Location(Bukkit.getWorld(world), x, y, z, yaw, pitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return world + "," + x + "," + y + "," + z + "," + yaw + "," + pitch;
|
return world + "," + x + "," + y + "," + z + "," + yaw + "," + pitch;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user