Configurable hardcore difficulty
This commit is contained in:
@@ -279,4 +279,9 @@ public class AkarinGlobalConfig {
|
||||
private static void sendLightOnlyChunkSection() {
|
||||
sendLightOnlyChunkSection = getBoolean("core.send-light-only-chunk-sections", true);
|
||||
}
|
||||
|
||||
public static boolean forceHardcoreDifficulty;
|
||||
private static void forceHardcoreDifficulty() {
|
||||
forceHardcoreDifficulty = getBoolean("alternative.force-difficulty-on-hardcore", true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,6 +75,7 @@ public class AkarinSlackScheduler extends Thread {
|
||||
}
|
||||
|
||||
// Force hardcore difficulty, from WorldServer#doTick
|
||||
if (AkarinGlobalConfig.forceHardcoreDifficulty)
|
||||
for (WorldServer world : server.worlds) {
|
||||
if (world.getWorldData().isHardcore() && world.getDifficulty() != EnumDifficulty.HARD) {
|
||||
world.getWorldData().setDifficulty(EnumDifficulty.HARD);
|
||||
|
||||
Reference in New Issue
Block a user