Don't save the cell when we are loading it.
This commit is contained in:
parent
7743897b9d
commit
89dbc4d2be
@ -209,6 +209,7 @@ public class JailIO {
|
||||
c.setPrisoner(p);
|
||||
}
|
||||
|
||||
j.addCell(c, false);
|
||||
}
|
||||
}else {
|
||||
pl.getLogger().warning("Cell configuration section for " + name + " exists but no cells are there.");
|
||||
|
@ -130,8 +130,8 @@ public class Jail {
|
||||
}
|
||||
|
||||
/** Adds a cell to the Jail. */
|
||||
public void addCell(Cell cell) {
|
||||
plugin.getJailIO().saveJail(this);
|
||||
public void addCell(Cell cell, boolean save) {
|
||||
if(save) plugin.getJailIO().saveJail(this);
|
||||
this.cells.put(cell.getName(), cell);
|
||||
}
|
||||
|
||||
|
@ -138,7 +138,7 @@ public class CellCreationSteps {
|
||||
c.setTeleport(cp.getTeleportInSL());
|
||||
c.setChestLocation(cp.getChestLocation());
|
||||
|
||||
j.addCell(c);
|
||||
j.addCell(c, true);
|
||||
|
||||
jm.removeCellCreationPlayer(player.getName());
|
||||
jm.addCreatingCell(player.getName(), j.getName(), "cell_n" + (j.getCellCount() + 1));
|
||||
|
Loading…
Reference in New Issue
Block a user