Rename enchantment list command and add aliases

- The old name of the command to list all registered commands on the server was "listAvailable". This name provides no information about what it actually lists, making it hard to remember or use. The command now has 3 names: "listAvailableEnchantments", "listEnchantments", and "enchantments". These commands should be easier to remember and use.
This commit is contained in:
Pim van der Loos 2021-09-09 13:50:13 +02:00
parent 0a9ead5ffb
commit 62f316314f
No known key found for this signature in database
GPG Key ID: C16F020ADAE6D5A8

View File

@ -98,7 +98,10 @@ public class CommandHandler implements CommandExecutor
return true;
}
if (args.length == 1 && args[0].equalsIgnoreCase("listAvailable"))
if (args.length == 1 &&
(args[0].equalsIgnoreCase("listAvailableEnchantments") ||
args[0].equalsIgnoreCase("listEnchantments") ||
args[0].equalsIgnoreCase("enchantments")))
{
listAvailableEnchantments();
return true;