Update and hopefully fix the persisting issue
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
a950640aae
Commit
b52283afa3
@ -21,6 +21,7 @@ package de.steamwar.bausystem;
|
|||||||
|
|
||||||
import com.comphenix.tinyprotocol.TinyProtocol;
|
import com.comphenix.tinyprotocol.TinyProtocol;
|
||||||
import de.steamwar.bausystem.configplayer.Config;
|
import de.steamwar.bausystem.configplayer.Config;
|
||||||
|
import de.steamwar.bausystem.features.world.RamUsage;
|
||||||
import de.steamwar.bausystem.region.loader.PrototypeLoader;
|
import de.steamwar.bausystem.region.loader.PrototypeLoader;
|
||||||
import de.steamwar.bausystem.region.loader.RegionLoader;
|
import de.steamwar.bausystem.region.loader.RegionLoader;
|
||||||
import de.steamwar.bausystem.region.loader.Updater;
|
import de.steamwar.bausystem.region.loader.Updater;
|
||||||
@ -73,6 +74,7 @@ public class BauSystem extends JavaPlugin implements Listener {
|
|||||||
new Updater(RegionLoader.file, RegionLoader::load);
|
new Updater(RegionLoader.file, RegionLoader::load);
|
||||||
|
|
||||||
LinkageUtils.link();
|
LinkageUtils.link();
|
||||||
|
RamUsage.init();
|
||||||
|
|
||||||
// This could disable any watchdog stuff. We need to investigate if this is a problem.
|
// This could disable any watchdog stuff. We need to investigate if this is a problem.
|
||||||
/*
|
/*
|
||||||
|
@ -22,6 +22,7 @@ package de.steamwar.bausystem.features.world;
|
|||||||
import lombok.experimental.UtilityClass;
|
import lombok.experimental.UtilityClass;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
import java.util.concurrent.locks.LockSupport;
|
||||||
|
|
||||||
@UtilityClass
|
@UtilityClass
|
||||||
public class RamUsage {
|
public class RamUsage {
|
||||||
@ -48,11 +49,8 @@ public class RamUsage {
|
|||||||
|
|
||||||
usage = _getUsage();
|
usage = _getUsage();
|
||||||
load = _getLoad();
|
load = _getLoad();
|
||||||
try {
|
Thread.yield();
|
||||||
Thread.sleep(1000);
|
LockSupport.parkNanos(1000000000L);
|
||||||
} catch (InterruptedException e) {
|
|
||||||
Thread.currentThread().interrupt();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
thread.setDaemon(true);
|
thread.setDaemon(true);
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren