mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-12-27 02:48:04 +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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sender.hasPermission(Permissions.FEATURE_COMMAND_NOCHEATPLUS)){
|
if (sender.hasPermission(Permissions.FILTER_COMMAND_NOCHEATPLUS)){
|
||||||
// Check sub-commands.
|
// Check sub-commands.
|
||||||
if (args.length > 0){
|
if (args.length > 0){
|
||||||
AbstractCommand<?> subCommand = subCommands.get(args[0].trim().toLowerCase());
|
AbstractCommand<?> subCommand = subCommands.get(args[0].trim().toLowerCase());
|
||||||
|
@ -32,9 +32,9 @@ public class Permissions {
|
|||||||
private final static String BYPASS = NOCHEATPLUS + ".bypass";
|
private final static String BYPASS = NOCHEATPLUS + ".bypass";
|
||||||
public static final String BYPASS_DENY_LOGIN = BYPASS + "denylogin";
|
public static final String BYPASS_DENY_LOGIN = BYPASS + "denylogin";
|
||||||
|
|
||||||
private static final String FEATURE = NOCHEATPLUS + ".feature";
|
private static final String FILTER = NOCHEATPLUS + ".filter";
|
||||||
public static final String FEATURE_COMMAND = FEATURE + ".command";
|
public static final String FILTER_COMMAND = FILTER + ".command";
|
||||||
public static final String FEATURE_COMMAND_NOCHEATPLUS = FEATURE_COMMAND + ".nocheatplus";
|
public static final String FILTER_COMMAND_NOCHEATPLUS = FILTER_COMMAND + ".nocheatplus";
|
||||||
|
|
||||||
// Notifications (in-game).
|
// Notifications (in-game).
|
||||||
public static final String NOTIFY = NOCHEATPLUS + ".notify";
|
public static final String NOTIFY = NOCHEATPLUS + ".notify";
|
||||||
|
@ -653,7 +653,7 @@ public class NoCheatPlus extends JavaPlugin implements NoCheatPlusAPI {
|
|||||||
|
|
||||||
protected void setupCommandProtection() {
|
protected void setupCommandProtection() {
|
||||||
final List<CommandProtectionEntry> changedCommands = PermissionUtil.protectCommands(
|
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;
|
if (this.changedCommands == null) this.changedCommands = changedCommands;
|
||||||
else this.changedCommands.addAll(changedCommands);
|
else this.changedCommands.addAll(changedCommands);
|
||||||
}
|
}
|
||||||
@ -838,7 +838,7 @@ public class NoCheatPlus extends JavaPlugin implements NoCheatPlusAPI {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
// Set child permissions for commands for faster checking.
|
// 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:
|
nocheatplus.notify:
|
||||||
description: Receive notifications about violations in-game.
|
description: Receive notifications about violations in-game.
|
||||||
|
|
||||||
nocheatplus.feature.command:
|
nocheatplus.filter.command:
|
||||||
# TODO: Adapt permission to new config section for this feature.
|
|
||||||
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.
|
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:
|
children:
|
||||||
nocheatplus.feature.command.nocheatplus:
|
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 aspects of super-perms.
|
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:
|
nocheatplus.command:
|
||||||
description: "All command permissions, do not give lightly - if in doubt use shortcut permissions for moderators (nocheatplus.shortcut.monitor|safeadmin ...)."
|
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