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:
Brettflan
2011-09-13 13:14:09 -05:00
parent 249846d6ae
commit 43fdc8ae14
8 changed files with 92 additions and 5 deletions

View File

@ -120,6 +120,7 @@ public class Factions extends JavaPlugin {
commands.add(new FCommandOwnerList());
commands.add(new FCommandPower());
commands.add(new FCommandPeaceful());
commands.add(new FCommandPermanent());
commands.add(new FCommandRelationAlly());
commands.add(new FCommandRelationEnemy());
commands.add(new FCommandRelationNeutral());
@ -425,6 +426,10 @@ public class Factions extends JavaPlugin {
return hasPerm(sender, "factions.setPeaceful");
}
public static boolean hasPermSetPermanent(CommandSender sender) {
return hasPerm(sender, "factions.setPermanent");
}
public static boolean hasPermPeacefulExplosionToggle(CommandSender sender) {
return hasPerm(sender, "factions.peacefulExplosionToggle");
}