Save the Jail when we add it.
This commit is contained in:
parent
af9d1a1f5b
commit
7976dec870
@ -58,9 +58,15 @@ public class JailManager {
|
||||
return this.jails.keySet().toArray(new String[jails.size()]);
|
||||
}
|
||||
|
||||
/** Adds a jail to the collection of them. */
|
||||
public void addJail(Jail jail) {
|
||||
/**
|
||||
* Adds a jail to the collection of them.
|
||||
*
|
||||
* @param jail The jail to add
|
||||
* @param n True if this is a new jail, false if it isn't.
|
||||
*/
|
||||
public void addJail(Jail jail, boolean n) {
|
||||
this.jails.put(jail.getName(), jail);
|
||||
if(n) plugin.getJailIO().saveJail(jail);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -135,7 +135,7 @@ public class JailCreationSteps {
|
||||
jail.setTeleportIn(cp.getTeleportInSL());
|
||||
jail.setTeleportFree(cp.getTeleportFreeSL());
|
||||
|
||||
jm.addJail(jail);
|
||||
jm.addJail(jail, true);
|
||||
|
||||
p.sendMessage(ChatColor.GREEN + "Jail (" + jail.getName() + ") created successfully!");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user