Don't allow jailing in unloaded worlds and don't allow joining while
jailed in unloaded worlds.
This commit is contained in:
@ -21,6 +21,7 @@ import com.graywolf336.jail.Util;
|
||||
*/
|
||||
public class Jail {
|
||||
private JailMain plugin;
|
||||
private boolean enabled;
|
||||
private HashMap<String, Cell> cells;
|
||||
private HashMap<UUID, Prisoner> nocellPrisoners;//prisoners who aren't in a cell
|
||||
private String name = "", world = "";
|
||||
@ -29,6 +30,7 @@ public class Jail {
|
||||
|
||||
public Jail(JailMain plugin, String name) {
|
||||
this.plugin = plugin;
|
||||
this.enabled = true;
|
||||
this.name = name;
|
||||
cells = new HashMap<String, Cell>();
|
||||
nocellPrisoners = new HashMap<UUID, Prisoner>();
|
||||
@ -39,6 +41,16 @@ public class Jail {
|
||||
return this.plugin;
|
||||
}
|
||||
|
||||
/** Sets whether this jail can be used or not. */
|
||||
public void setEnabled(boolean enabled) {
|
||||
this.enabled = enabled;
|
||||
}
|
||||
|
||||
/** Gets whether this jail is enabled or not. */
|
||||
public boolean isEnabled() {
|
||||
return this.enabled;
|
||||
}
|
||||
|
||||
/** Sets the name of the jail. */
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
|
Reference in New Issue
Block a user