Remove "list" alias for holder info (#461)

This commit is contained in:
Luck 2017-09-04 16:55:10 +01:00
parent d60d0ac9c5
commit 925d3ccd1b
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -309,6 +309,7 @@ public class CommandManager {
}
private static void handleRewrites(List<String> args) {
// Provide aliases
if (args.size() >= 1) {
if (args.get(0).equalsIgnoreCase("u")) {
args.remove(0);
@ -318,6 +319,14 @@ public class CommandManager {
args.remove(0);
args.add(0, "group");
}
if (args.get(0).equalsIgnoreCase("t")) {
args.remove(0);
args.add(0, "track");
}
if (args.get(0).equalsIgnoreCase("i")) {
args.remove(0);
args.add(0, "info");
}
}
if (args.size() >= 3) {
@ -341,7 +350,6 @@ public class CommandManager {
break;
case "i":
case "about":
case "list":
args.remove(2);
args.add(2, "info");
break;
@ -349,6 +357,7 @@ public class CommandManager {
case "inheritances":
case "group":
case "groups":
case "g":
case "rank":
case "ranks":
case "parents":
@ -439,7 +448,7 @@ public class CommandManager {
boolean lazyInfo = (
args.size() >= 4 &&
(args.get(2).equalsIgnoreCase("permission") || args.get(2).equalsIgnoreCase("parent") || args.get(2).equalsIgnoreCase("meta")) &&
(args.get(3).equalsIgnoreCase("i") || args.get(3).equalsIgnoreCase("about") || args.get(3).equalsIgnoreCase("list"))
(args.get(3).equalsIgnoreCase("i") || args.get(3).equalsIgnoreCase("about"))
);
if (lazyInfo) {