mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-17 17:34:39 +01:00
Introduce a new arguments parser (#1629)
Original commits: * Clean-up * Introduce a new application arguments parser & handler * Clean-up and deprecate `Tools#getLanguageOption` * Fix `-debug` and `-debugall` parameters * found this while debugging, ...why * Remove deprecated parameters * Invoke startup argument parser before handbook generation * Move command map instantiation to `Grasscutter `(prevent making 3 instances on startup) * Ensure \n at EOF Co-authored-by: AnimeGitB <AnimeGitB@bigblueball.in>
This commit is contained in:
@@ -72,7 +72,6 @@ public final class GameServer extends KcpServer {
|
||||
|
||||
// Extra
|
||||
private final ServerTaskScheduler scheduler;
|
||||
private final CommandMap commandMap;
|
||||
private final TaskMap taskMap;
|
||||
|
||||
private ChatManagerHandler chatManager;
|
||||
@@ -107,7 +106,6 @@ public final class GameServer extends KcpServer {
|
||||
|
||||
// Extra
|
||||
this.scheduler = new ServerTaskScheduler();
|
||||
this.commandMap = new CommandMap(true);
|
||||
this.taskMap = new TaskMap(true);
|
||||
|
||||
// Create game systems
|
||||
|
||||
@@ -54,7 +54,7 @@ final class HandbookRequestHandler implements DocumentationHandler {
|
||||
sbs.add(new StringBuilder(""));
|
||||
|
||||
// Commands table
|
||||
new CommandMap(true).getHandlersAsList().forEach(cmd -> {
|
||||
CommandMap.getInstance().getHandlersAsList().forEach(cmd -> {
|
||||
String label = cmd.getLabel();
|
||||
String descKey = cmd.getDescriptionKey();
|
||||
for (int langIdx = 0; langIdx < NUM_LANGUAGES; langIdx++)
|
||||
|
||||
Reference in New Issue
Block a user