mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-12-26 02:57:56 +01:00
Send a more informative message when the bulkupdate command is used from in-game
This commit is contained in:
parent
37d4f92c33
commit
066189b486
@ -63,6 +63,11 @@ public class BulkUpdateCommand extends SingleCommand {
|
||||
|
||||
@Override
|
||||
public CommandResult execute(LuckPermsPlugin plugin, Sender sender, List<String> args, String label) throws CommandException {
|
||||
if (!sender.isConsole()) {
|
||||
Message.BULK_UPDATE_MUST_USE_CONSOLE.send(sender);
|
||||
return CommandResult.NO_PERMISSION;
|
||||
}
|
||||
|
||||
if (args.size() == 2 && args.get(0).equalsIgnoreCase("confirm")) {
|
||||
|
||||
String id = args.get(1);
|
||||
@ -156,9 +161,4 @@ public class BulkUpdateCommand extends SingleCommand {
|
||||
|
||||
return CommandResult.SUCCESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAuthorized(Sender sender) {
|
||||
return sender.isConsole(); // we only want console to be able to use this command
|
||||
}
|
||||
}
|
||||
|
@ -332,6 +332,7 @@ public enum Message {
|
||||
UNSET_META_SUCCESS("&aUnset meta key &f'{}&f'&a for &b{}&a in context {}&a.", true),
|
||||
UNSET_META_TEMP_SUCCESS("&aUnset temporary meta key &f'{}&f'&a for &b{}&a in context {}&a.", true),
|
||||
|
||||
BULK_UPDATE_MUST_USE_CONSOLE("&cThe bulk update command can only be used from the console.", true),
|
||||
BULK_UPDATE_INVALID_DATA_TYPE("&cInvalid type. Was expecting 'all', 'users' or 'groups'.", true),
|
||||
BULK_UPDATE_INVALID_CONSTRAINT("&cInvalid constraint &4{}&c. Constraints should be in the format '&f<field> <comparison operator> <value>&c'.", true),
|
||||
BULK_UPDATE_INVALID_COMPARISON("&cInvalid comparison operator '&4{}&c'. Expected one of the following: &f== != ~~ ~!", true),
|
||||
|
Loading…
Reference in New Issue
Block a user