Make order of internal reload event listeners consistent

This commit is contained in:
Jason Penilla authored and Jason committed 2023-07-11 17:22:45 -07:00
1 parent ef62dc24f5
commit 702f5ad823
3 files changed
+6 -3

No files matched your search

@@ -26,6 +26,7 @@ import com.google.inject.Inject;
import com.google.inject.Injector;
import com.google.inject.Singleton;
import com.google.inject.TypeLiteral;
import com.seiama.event.EventConfig;
import com.seiama.registry.Registry;
import java.io.IOException;
import java.nio.file.DirectoryStream;
@@ -115,7 +116,7 @@ public class CarbonChannelRegistry extends ChatListenerInternal implements Chann
this.carbonMessages = carbonMessages;
this.eventHandler = events;
events.subscribe(CarbonReloadEvent.class, event -> this.reloadConfigChannels());
events.subscribe(CarbonReloadEvent.class, -99, EventConfig.DEFAULT_ACCEPTS_CANCELLED, event -> this.reloadConfigChannels());
}
public static ConfigurationTransformation.Versioned versioned() {
@@ -21,6 +21,7 @@ package net.draycia.carbon.common.config;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import com.seiama.event.EventConfig;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
@@ -56,7 +57,7 @@ public class ConfigFactory {
this.dataDirectory = dataDirectory;
this.locale = locale;
events.subscribe(CarbonReloadEvent.class, event -> this.reloadPrimaryConfig());
events.subscribe(CarbonReloadEvent.class, -100, EventConfig.DEFAULT_ACCEPTS_CANCELLED, event -> this.reloadPrimaryConfig());
}
public @Nullable PrimaryConfig reloadPrimaryConfig() {
@@ -21,6 +21,7 @@ package net.draycia.carbon.common.messages;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import com.seiama.event.EventConfig;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
@@ -86,7 +87,7 @@ public final class CarbonMessageSource implements IMessageSource<Audience, Strin
this.reloadTranslations();
events.subscribe(CarbonReloadEvent.class, event -> {
events.subscribe(CarbonReloadEvent.class, -99, EventConfig.DEFAULT_ACCEPTS_CANCELLED, event -> {
this.reloadTranslations();
});
}