Skip to content

Commit 2a2c77b

Browse files
committed
Refactor VaxCommandRegistry initialization
Moved VaxCommandRegistry initialization to the language setup loop to ensure it is instantiated after language configurations are loaded. This improves initialization logic and enhances code readability.
1 parent 530eb52 commit 2a2c77b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/de/varilx/BaseAPI.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ public BaseAPI(JavaPlugin plugin) {
3232
this.plugin = plugin;
3333
this.languageConfigurations = new HashMap<>();
3434
this.gameInventoryController = new GameInventoryController(this);
35-
this.vaxCommandRegistry = new VaxCommandRegistry();
3635
BaseAPI.baseAPI = this;
3736
}
3837

@@ -48,6 +47,7 @@ public void enable() {
4847
Configuration config = new Configuration(plugin.getDataFolder(), "lang/" + locale.getLanguage() + ".yml");
4948
this.languageConfigurations.put(locale.getLanguage(), config);
5049
});
50+
this.vaxCommandRegistry = new VaxCommandRegistry();
5151
}
5252

5353
}

0 commit comments

Comments
 (0)