Skip to content

Commit e7196a0

Browse files
committed
Update listener manager asynchronously after language change
1 parent b36f63f commit e7196a0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/net/clementraynaud/skoice/commands/skoice/arguments/LanguageArgument.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ public void run() {
5454
super.plugin.getConfigYamlFile().set(ConfigField.LANG.toString(), language.toString());
5555
super.plugin.getLang().load(language);
5656
super.plugin.getBot().getLang().load(language);
57-
super.plugin.getListenerManager().update();
57+
this.plugin.getServer().getScheduler().runTaskAsynchronously(this.plugin, () -> {
58+
super.plugin.getListenerManager().update();
59+
});
5860

5961
if (this.plugin.getBot().getStatus() != BotStatus.NOT_CONNECTED) {
6062
this.plugin.getBot().getCommands().register();

0 commit comments

Comments
 (0)