Start Logging

Signed-off-by: Chaoscaot <max@maxsp.de>
This commit is contained in:
2026-01-28 20:44:05 +01:00
parent 361c698323
commit ec41111054
9 changed files with 159 additions and 65 deletions
@@ -19,9 +19,14 @@
package de.steamwar.core;
import lombok.Getter;
public class CheckpointUtils {
private CheckpointUtils() {}
@Getter
private static boolean restored = false;
public static void signalHandler() {
try {
CheckpointUtilsJ9.signalHandler();
@@ -33,6 +38,7 @@ public class CheckpointUtils {
public static void freeze() {
try {
CheckpointUtilsJ9.freeze();
restored = true;
} catch (NoClassDefFoundError e) {
//ignore
}
@@ -19,6 +19,8 @@
package de.steamwar.sql;
import de.steamwar.ServerInfo;
import de.steamwar.core.CheckpointUtils;
import de.steamwar.core.Core;
import de.steamwar.data.GameModeConfigUtils;
import org.bukkit.Bukkit;
@@ -68,4 +70,9 @@ public class SQLWrapperImpl implements SQLWrapper<Material> {
builder.append(world.getName()).append(" ");
builder.append("\nServer: ").append(SERVER_VERSION);
}
@Override
public ServerInfo getServerInfo() {
return new ServerInfo(Core.getServerName(), Core.getVersion(), CheckpointUtils.isRestored());
}
}