New command to set a faction as permanent: /f permanent <faction tag> (requires new admin-level permission "factions.setPermanent"). Permanent factions will not be deleted if they have no members, and faction admins of such factions are allowed to leave without a replacement available. Faction admins are also unable to disband their own faction if it is Permanent; only those with the admin-level "factions.disband" permission can disband such a faction while it is set as Permanent.
This commit is contained in:
@@ -34,6 +34,7 @@ public class Faction {
|
||||
private boolean open;
|
||||
private boolean peaceful;
|
||||
private boolean peacefulExplosionsEnabled;
|
||||
private boolean permanent;
|
||||
private String tag;
|
||||
private String description;
|
||||
private Location home;
|
||||
@@ -50,6 +51,9 @@ public class Faction {
|
||||
this.tag = "???";
|
||||
this.description = "Default faction description :(";
|
||||
this.lastPlayerLoggedOffTime = 0;
|
||||
this.peaceful = false;
|
||||
this.peacefulExplosionsEnabled = false;
|
||||
this.permanent = false;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
@@ -132,6 +136,14 @@ public class Faction {
|
||||
peaceful = isPeaceful;
|
||||
}
|
||||
|
||||
// "permanent" status can only be set by server admins/moderators/ops, and allows the faction to remain even with 0 members
|
||||
public boolean isPermanent() {
|
||||
return permanent;
|
||||
}
|
||||
public void setPermanent(boolean isPermanent) {
|
||||
permanent = isPermanent;
|
||||
}
|
||||
|
||||
public void setPeacefulExplosions(boolean disable) {
|
||||
peacefulExplosionsEnabled = disable;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user