fix splash being shown twice

This commit is contained in:
Julian Krings 2025-06-23 12:20:43 +02:00
parent 80548f753c
commit 0a0f77ff58
No known key found for this signature in database
GPG Key ID: 208C6E08C3B718D2
2 changed files with 11 additions and 7 deletions

View File

@ -470,7 +470,7 @@ public class Iris extends VolmitPlugin implements Listener {
ServerConfigurator.configure();
IrisSafeguard.IrisSafeguardSystem();
getSender().setTag(getTag());
IrisSafeguard.earlySplash();
IrisSafeguard.splash(true);
linkMultiverseCore = new MultiverseCoreLink();
linkMythicMobs = new MythicMobsLink();
configWatcher = new FileWatcher(getDataFile("settings.json"));
@ -485,8 +485,7 @@ public class Iris extends VolmitPlugin implements Listener {
J.sr(this::tickQueue, 0);
J.s(this::setupPapi);
J.a(ServerConfigurator::configure, 20);
splash();
UtilsSFG.splash();
IrisSafeguard.splash(false);
autoStartStudio();
checkForBukkitWorlds();

View File

@ -3,7 +3,10 @@ package com.volmit.iris.core.safeguard;
import com.volmit.iris.Iris;
import com.volmit.iris.core.IrisSettings;
import java.util.concurrent.atomic.AtomicBoolean;
public class IrisSafeguard {
private static final AtomicBoolean sfg = new AtomicBoolean(false);
public static boolean unstablemode = false;
public static boolean warningmode = false;
public static boolean stablemode = false;
@ -13,12 +16,14 @@ public class IrisSafeguard {
ServerBootSFG.BootCheck();
}
public static void earlySplash() {
if (ServerBootSFG.safeguardPassed || IrisSettings.get().getGeneral().DoomsdayAnnihilationSelfDestructMode)
public static void splash(boolean early) {
if (early && (ServerBootSFG.safeguardPassed || IrisSettings.get().getGeneral().DoomsdayAnnihilationSelfDestructMode))
return;
Iris.instance.splash();
UtilsSFG.splash();
if (!sfg.getAndSet(true)) {
Iris.instance.splash();
UtilsSFG.splash();
}
}
public static String mode() {