Add inspector mode shortcut command (/coi|/gusi)
This commit is contained in:
parent
edf08fc750
commit
173bed6a10
2 changed files with 18 additions and 0 deletions
|
|
@ -25,6 +25,14 @@ public class CommandHandler implements CommandExecutor {
|
||||||
public boolean onCommand(CommandSender user, Command command, String commandLabel, String[] argumentArray) {
|
public boolean onCommand(CommandSender user, Command command, String commandLabel, String[] argumentArray) {
|
||||||
String commandName = command.getName().toLowerCase(Locale.ROOT);
|
String commandName = command.getName().toLowerCase(Locale.ROOT);
|
||||||
|
|
||||||
|
// Griefus begin
|
||||||
|
if (commandName.equals("coi") || commandName.equals("gusi")) {
|
||||||
|
boolean permission = user.hasPermission("coreprotect.inspect");
|
||||||
|
InspectCommand.runCommand(user, permission, argumentArray);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
// Griefus end
|
||||||
|
|
||||||
if (commandName.equals("core") || commandName.equals("coreprotect") || commandName.equals("co") || commandName.equals("griefus") || commandName.equals("gus")) {
|
if (commandName.equals("core") || commandName.equals("coreprotect") || commandName.equals("co") || commandName.equals("griefus") || commandName.equals("gus")) {
|
||||||
int resultc = argumentArray.length;
|
int resultc = argumentArray.length;
|
||||||
if (resultc > -1) {
|
if (resultc > -1) {
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,16 @@ commands:
|
||||||
permission: coreprotect.griefus
|
permission: coreprotect.griefus
|
||||||
permission-message: §3Griefus §f- You do not have permission to do that.
|
permission-message: §3Griefus §f- You do not have permission to do that.
|
||||||
usage: /<command> <params>
|
usage: /<command> <params>
|
||||||
|
coi:
|
||||||
|
description: Inspector mode shortcut
|
||||||
|
permission: coreprotect.inspect
|
||||||
|
permission-message: §3Griefus §f- You do not have permission to do that.
|
||||||
|
usage: /<command> <params>
|
||||||
|
gusi:
|
||||||
|
description: Inspector mode shortcut
|
||||||
|
permission: coreprotect.inspect
|
||||||
|
permission-message: §3Griefus §f- You do not have permission to do that.
|
||||||
|
usage: /<command> <params>
|
||||||
permissions:
|
permissions:
|
||||||
coreprotect.*:
|
coreprotect.*:
|
||||||
description: Gives access to all Griefus actions and commands
|
description: Gives access to all Griefus actions and commands
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue