From d393a4c9ca8b16e32d0d725818659d1b80c9daed Mon Sep 17 00:00:00 2001 From: Luck Date: Fri, 3 Nov 2017 16:26:54 +0000 Subject: [PATCH] Alias /lp player --> /lp user --- .../luckperms/common/commands/CommandManager.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/CommandManager.java b/common/src/main/java/me/lucko/luckperms/common/commands/CommandManager.java index e42720b34..05c0bfee6 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/CommandManager.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/CommandManager.java @@ -311,19 +311,17 @@ public class CommandManager { private static void handleRewrites(List args, boolean rewriteLastArgument) { // Provide aliases if (args.size() >= 1 && (rewriteLastArgument || args.size() >= 2)) { - if (args.get(0).equalsIgnoreCase("u")) { + String arg0 = args.get(0); + if (arg0.equalsIgnoreCase("u") || arg0.equalsIgnoreCase("player") || arg0.equalsIgnoreCase("p")) { args.remove(0); args.add(0, "user"); - } - if (args.get(0).equalsIgnoreCase("g")) { + } else if (arg0.equalsIgnoreCase("g")) { args.remove(0); args.add(0, "group"); - } - if (args.get(0).equalsIgnoreCase("t")) { + } else if (arg0.equalsIgnoreCase("t")) { args.remove(0); args.add(0, "track"); - } - if (args.get(0).equalsIgnoreCase("i")) { + } else if (arg0.equalsIgnoreCase("i")) { args.remove(0); args.add(0, "info"); }