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);
|
c.setPrisoner(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
j.addCell(c, false);
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
pl.getLogger().warning("Cell configuration section for " + name + " exists but no cells are there.");
|
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. */
|
/** Adds a cell to the Jail. */
|
||||||
public void addCell(Cell cell) {
|
public void addCell(Cell cell, boolean save) {
|
||||||
plugin.getJailIO().saveJail(this);
|
if(save) plugin.getJailIO().saveJail(this);
|
||||||
this.cells.put(cell.getName(), cell);
|
this.cells.put(cell.getName(), cell);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ public class CellCreationSteps {
|
|||||||
c.setTeleport(cp.getTeleportInSL());
|
c.setTeleport(cp.getTeleportInSL());
|
||||||
c.setChestLocation(cp.getChestLocation());
|
c.setChestLocation(cp.getChestLocation());
|
||||||
|
|
||||||
j.addCell(c);
|
j.addCell(c, true);
|
||||||
|
|
||||||
jm.removeCellCreationPlayer(player.getName());
|
jm.removeCellCreationPlayer(player.getName());
|
||||||
jm.addCreatingCell(player.getName(), j.getName(), "cell_n" + (j.getCellCount() + 1));
|
jm.addCreatingCell(player.getName(), j.getName(), "cell_n" + (j.getCellCount() + 1));
|
||||||
|
Loading…
Reference in New Issue
Block a user