Alias /lp player --> /lp user

This commit is contained in:
Luck 2017-11-03 16:26:54 +00:00
parent 9ea6b0b8bb
commit d393a4c9ca
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -311,19 +311,17 @@ public class CommandManager {
private static void handleRewrites(List<String> args, boolean rewriteLastArgument) { private static void handleRewrites(List<String> args, boolean rewriteLastArgument) {
// Provide aliases // Provide aliases
if (args.size() >= 1 && (rewriteLastArgument || args.size() >= 2)) { 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.remove(0);
args.add(0, "user"); args.add(0, "user");
} } else if (arg0.equalsIgnoreCase("g")) {
if (args.get(0).equalsIgnoreCase("g")) {
args.remove(0); args.remove(0);
args.add(0, "group"); args.add(0, "group");
} } else if (arg0.equalsIgnoreCase("t")) {
if (args.get(0).equalsIgnoreCase("t")) {
args.remove(0); args.remove(0);
args.add(0, "track"); args.add(0, "track");
} } else if (arg0.equalsIgnoreCase("i")) {
if (args.get(0).equalsIgnoreCase("i")) {
args.remove(0); args.remove(0);
args.add(0, "info"); args.add(0, "info");
} }