New "peaceful" status for factions which can only be set by server admins/moderators. Members of peaceful factions cannot deal or receive PvP damage (unless in a war zone which has friendly fire enabled), cannot claim land from another faction and likewise can't have their land claimed, and cannot be considered as ally or enemy of any other faction. Faction admins and moderators of peaceful factions can enable/disable all explosions inside their faction's territory at will. The main purpose of this is to provide a way for more peaceful players who don't want to take part in faction wars (or just want to take a break from them) to still have fun on the server. It is also meant to allow groups of players to make protected buildings, monuments, grand constructions, and so forth without having to worry about another faction destroying them.
New conf.json settings: "peacefulTerritoryDisablePVP" (default true) prevents PvP damage for anyone inside a peaceful faction's territory "peacefulTerritoryDisableMonsters" (default false) provides protection against monsters spawning or attacking inside a peaceful faction's territory "peacefulMembersDisablePowerLoss" (default true) which keeps members of peaceful factions from suffering power loss when they die. New commands: /f peaceful [faction tag] - toggle the indicated faction's "peaceful" status /f noboom - enable/disable explosions inside your faction's territory; only available to faction admin and faction moderators for peaceful factions New permission nodes: factions.setPeaceful - ability to use the /f peaceful command (admins) factions.peacefulExplosionToggle - ability to use /f noboom (everyone)
This commit is contained in:
@ -113,10 +113,12 @@ public class Factions extends JavaPlugin {
|
||||
commands.add(new FCommandLock());
|
||||
commands.add(new FCommandMap());
|
||||
commands.add(new FCommandMod());
|
||||
commands.add(new FCommandNoBoom());
|
||||
commands.add(new FCommandOpen());
|
||||
commands.add(new FCommandOwner());
|
||||
commands.add(new FCommandOwnerList());
|
||||
commands.add(new FCommandPower());
|
||||
commands.add(new FCommandPeaceful());
|
||||
commands.add(new FCommandRelationAlly());
|
||||
commands.add(new FCommandRelationEnemy());
|
||||
commands.add(new FCommandRelationNeutral());
|
||||
@ -400,6 +402,14 @@ public class Factions extends JavaPlugin {
|
||||
return hasPerm(sender, "factions.ownershipBypass");
|
||||
}
|
||||
|
||||
public static boolean hasPermSetPeaceful(CommandSender sender) {
|
||||
return hasPerm(sender, "factions.setPeaceful");
|
||||
}
|
||||
|
||||
public static boolean hasPermPeacefulExplosionToggle(CommandSender sender) {
|
||||
return hasPerm(sender, "factions.peacefulExplosionToggle");
|
||||
}
|
||||
|
||||
public static boolean isCommandDisabled(CommandSender sender, String command) {
|
||||
return (hasPerm(sender, "factions.commandDisable."+command) && !hasPerm(sender, "factions.commandDisable.none"));
|
||||
}
|
||||
|
Reference in New Issue
Block a user