mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-12-26 02:17:42 +01:00
Change feature (filter) permissions to nocheatplus.filter...
This commit is contained in:
parent
84c376864e
commit
0e56338336
@ -150,7 +150,7 @@ public class NoCheatPlusCommand extends BaseCommand{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (sender.hasPermission(Permissions.FEATURE_COMMAND_NOCHEATPLUS)){
|
||||
if (sender.hasPermission(Permissions.FILTER_COMMAND_NOCHEATPLUS)){
|
||||
// Check sub-commands.
|
||||
if (args.length > 0){
|
||||
AbstractCommand<?> subCommand = subCommands.get(args[0].trim().toLowerCase());
|
||||
|
@ -32,9 +32,9 @@ public class Permissions {
|
||||
private final static String BYPASS = NOCHEATPLUS + ".bypass";
|
||||
public static final String BYPASS_DENY_LOGIN = BYPASS + "denylogin";
|
||||
|
||||
private static final String FEATURE = NOCHEATPLUS + ".feature";
|
||||
public static final String FEATURE_COMMAND = FEATURE + ".command";
|
||||
public static final String FEATURE_COMMAND_NOCHEATPLUS = FEATURE_COMMAND + ".nocheatplus";
|
||||
private static final String FILTER = NOCHEATPLUS + ".filter";
|
||||
public static final String FILTER_COMMAND = FILTER + ".command";
|
||||
public static final String FILTER_COMMAND_NOCHEATPLUS = FILTER_COMMAND + ".nocheatplus";
|
||||
|
||||
// Notifications (in-game).
|
||||
public static final String NOTIFY = NOCHEATPLUS + ".notify";
|
||||
|
@ -653,7 +653,7 @@ public class NoCheatPlus extends JavaPlugin implements NoCheatPlusAPI {
|
||||
|
||||
protected void setupCommandProtection() {
|
||||
final List<CommandProtectionEntry> changedCommands = PermissionUtil.protectCommands(
|
||||
Arrays.asList("plugins", "version", "icanhasbukkit"), Permissions.FEATURE_COMMAND, false);
|
||||
Arrays.asList("plugins", "version", "icanhasbukkit"), Permissions.FILTER_COMMAND, false);
|
||||
if (this.changedCommands == null) this.changedCommands = changedCommands;
|
||||
else this.changedCommands.addAll(changedCommands);
|
||||
}
|
||||
@ -838,7 +838,7 @@ public class NoCheatPlus extends JavaPlugin implements NoCheatPlusAPI {
|
||||
@Override
|
||||
public void run() {
|
||||
// Set child permissions for commands for faster checking.
|
||||
PermissionUtil.addChildPermission(commandHandler.getAllSubCommandPermissions(), Permissions.FEATURE_COMMAND_NOCHEATPLUS, PermissionDefault.OP);
|
||||
PermissionUtil.addChildPermission(commandHandler.getAllSubCommandPermissions(), Permissions.FILTER_COMMAND_NOCHEATPLUS, PermissionDefault.OP);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
@ -250,12 +250,11 @@ permissions:
|
||||
nocheatplus.notify:
|
||||
description: Receive notifications about violations in-game.
|
||||
|
||||
nocheatplus.feature.command:
|
||||
# TODO: Adapt permission to new config section for this feature.
|
||||
nocheatplus.filter.command:
|
||||
description: Allows use of all commands protected by the command protection, like the ncp root command. Does not give functionality but allow seeing usage and tab-completion of the command. In future there can be many children not listed in this config.
|
||||
children:
|
||||
nocheatplus.feature.command.nocheatplus:
|
||||
description: Filter permission to allow using sub commands of the /nocheatplus command. This permission should not be necessary to ever be given to any player unless the permission plugin is incompatible with aspects of super-perms.
|
||||
nocheatplus.filter.command.nocheatplus:
|
||||
description: Filter permission to allow using sub commands of the /nocheatplus command. This permission should not be necessary to ever be given to any player unless the permission plugin is incompatible with certain aspects of super-perms.
|
||||
|
||||
nocheatplus.command:
|
||||
description: "All command permissions, do not give lightly - if in doubt use shortcut permissions for moderators (nocheatplus.shortcut.monitor|safeadmin ...)."
|
||||
|
Loading…
Reference in New Issue
Block a user