mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2026-05-16 23:52:37 +08:00
Change commands to use new usage message method.
This commit is contained in:
committed by
Luke H-W
Unverified
parent
2cfbe78184
commit
104e04f70a
@@ -35,6 +35,7 @@ public final class CommandMap {
|
||||
*/
|
||||
public CommandMap registerCommand(String label, CommandHandler command) {
|
||||
Grasscutter.getLogger().debug("Registered command: " + label);
|
||||
label = label.toLowerCase();
|
||||
|
||||
// Get command data.
|
||||
Command annotation = command.getClass().getAnnotation(Command.class);
|
||||
@@ -203,7 +204,7 @@ public final class CommandMap {
|
||||
// Parse message.
|
||||
String[] split = rawMessage.split(" ");
|
||||
List<String> args = new LinkedList<>(Arrays.asList(split));
|
||||
String label = args.remove(0);
|
||||
String label = args.remove(0).toLowerCase();
|
||||
String playerId = (player == null) ? consoleId : player.getAccount().getId();
|
||||
|
||||
// Check for special cases - currently only target command.
|
||||
|
||||
Reference in New Issue
Block a user