New command /f power [player name] to check either your own power (if no name is specified) or another player's power (if a player name is specified). The ability for a player to view their own power is based on the standard factions.participate permission, but to check the power of other players, the new permission node factions.viewAnyPower needs to be granted. If you aren't using a Permissions plugin (instead defaulting to the built-in Bukkit permission system), the factions.viewAnyPower permission is granted by default. Otherwise, you'll need to configure your Permissions plugin to grant the new permission as needed.
This commit is contained in:
@ -94,6 +94,7 @@ public class Factions extends JavaPlugin {
|
||||
commands.add(new FCommandMap());
|
||||
commands.add(new FCommandMod());
|
||||
commands.add(new FCommandOpen());
|
||||
commands.add(new FCommandPower());
|
||||
commands.add(new FCommandRelationAlly());
|
||||
commands.add(new FCommandRelationEnemy());
|
||||
commands.add(new FCommandRelationNeutral());
|
||||
@ -353,6 +354,10 @@ public class Factions extends JavaPlugin {
|
||||
return hasPerm(sender, "factions.worldOptions");
|
||||
}
|
||||
|
||||
public static boolean hasPermViewAnyPower(CommandSender sender) {
|
||||
return hasPerm(sender, "factions.viewAnyPower");
|
||||
}
|
||||
|
||||
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