Adds graceful shutdown for CraftBukkit #286

This commit is contained in:
2023-04-21 12:53:43 +02:00
parent 486149fa01
commit 50015c2912
3 changed files with 22 additions and 11 deletions

View File

@@ -45,7 +45,7 @@ public final class LanguageLoader {
loadedBackupStrings = load("en", inputStream);
} else {
loadedBackupStrings = null;
Stargate.getConsoleLogger().severe("[stargate] Error loading backup language. " +
Stargate.logSevere("Error loading backup language. " +
"There may be missing text in-game");
}
}
@@ -226,7 +226,7 @@ public final class LanguageLoader {
strings = FileHelper.readKeyValuePairs(bufferedReader, "=", ColorConversion.NORMAL);
} catch (Exception e) {
if (Stargate.getStargateConfig().isDebuggingEnabled()) {
Stargate.getConsoleLogger().info("[Stargate] Unable to load language " + lang);
Stargate.logInfo("Unable to load language " + lang);
}
return null;
}

View File

@@ -118,10 +118,10 @@ public final class StargateConfig {
/**
* Gets whether this configuration has been fully loaded
*
* @return <p>True if fully loaded</p>
* @return <p>True if not fully loaded</p>
*/
public boolean isLoaded() {
return this.isLoaded;
public boolean isNotLoaded() {
return !this.isLoaded;
}
/**