mirror of
https://github.com/PlayPro/CoreProtect.git
synced 2024-11-28 12:55:34 +01:00
Added "/co page" alias command for page lookups
This commit is contained in:
parent
b0d14f4d2b
commit
2c8e289c43
@ -1107,7 +1107,7 @@ public class CommandHandler implements CommandExecutor {
|
||||
else if (user.hasPermission("coreprotect.purge") && corecommand.equals("purge")) {
|
||||
permission = true;
|
||||
}
|
||||
else if (user.hasPermission("coreprotect.lookup") && (corecommand.equals("l") || corecommand.equals("lookup") || corecommand.equals("near"))) {
|
||||
else if (user.hasPermission("coreprotect.lookup") && (corecommand.equals("l") || corecommand.equals("lookup") || corecommand.equals("page") || corecommand.equals("near"))) {
|
||||
permission = true;
|
||||
}
|
||||
else if (user.hasPermission("coreprotect.lookup.near") && corecommand.equals("near")) {
|
||||
@ -1145,7 +1145,7 @@ public class CommandHandler implements CommandExecutor {
|
||||
else if (corecommand.equals("inspect") || corecommand.equals("i")) {
|
||||
InspectCommand.runCommand(user, permission, argumentArray);
|
||||
}
|
||||
else if (corecommand.equals("lookup") || corecommand.equals("l")) {
|
||||
else if (corecommand.equals("lookup") || corecommand.equals("l") || corecommand.equals("page")) {
|
||||
LookupCommand.runCommand(user, command, permission, argumentArray);
|
||||
}
|
||||
else if (corecommand.equals("near")) {
|
||||
|
@ -63,6 +63,11 @@ public class LookupCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
if (args[0].toLowerCase(Locale.ROOT).equals("page") && (args.length != 2 || !args[1].equals(args[1].replaceAll("[^0-9]", "")))) {
|
||||
Chat.sendMessage(player, Color.DARK_AQUA + "CoreProtect " + Color.WHITE + "- " + Phrase.build(Phrase.MISSING_PARAMETERS, Color.WHITE, "/co page <page>"));
|
||||
return;
|
||||
}
|
||||
|
||||
int argExcluded = argExclude.size();
|
||||
int argRestricted = argBlocks.size();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user