Let's loop through the signs when saving them to file so we save them

correctly in the flatfile.
This commit is contained in:
graywolf336 2013-12-11 17:36:17 -06:00
parent e21c2d87ad
commit f03714a5f7
2 changed files with 9 additions and 1 deletions

View File

@ -123,7 +123,14 @@ public class JailIO {
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) {
Prisoner p = c.getPrisoner();

View File

@ -46,6 +46,7 @@ public class SimpleLocation {
return new Location(Bukkit.getWorld(world), x, y, z, yaw, pitch);
}
@Override
public String toString() {
return world + "," + x + "," + y + "," + z + "," + yaw + "," + pitch;
}