Skip to content

Commit

Permalink
Merge branch 'dev/1.21.1' into dev/master
Browse files Browse the repository at this point in the history
  • Loading branch information
deirn committed Nov 12, 2024
2 parents ed018e3 + f426ef9 commit 4dc74ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/mcp/mobius/waila/Waila.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import mcp.mobius.waila.config.PluginConfig;
import mcp.mobius.waila.config.WailaConfig;
import mcp.mobius.waila.gui.hud.theme.ThemeDefinition;
import mcp.mobius.waila.plugin.PluginLoader;
import mcp.mobius.waila.plugin.PluginSide;
import mcp.mobius.waila.registry.RegistryFilter;
import mcp.mobius.waila.service.ICommonService;
Expand Down Expand Up @@ -71,7 +72,7 @@ public static ResourceLocation id(String path) {
}

static void onAnyTick() {
if (!firstTicked) {
if (!firstTicked && PluginLoader.INSTANCE.initialized) {
firstTicked = true;
JsonConfig.reloadAllInstances();
PluginConfig.write();
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/mcp/mobius/waila/plugin/PluginLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public abstract class PluginLoader {
);

private boolean gathered = false;
public volatile boolean initialized = false;

public static void reloadServerPlugins(MinecraftServer server) {
PluginInfo.saveToggleConfig();
Expand Down Expand Up @@ -194,6 +195,7 @@ public final void loadPlugins() {
PluginConfig.reload();

JsonConfig.reloadAllInstances();
initialized = true;
}

private void initialize(PluginInfo info) {
Expand Down

0 comments on commit 4dc74ca

Please sign in to comment.