fix keep spawn loaded config

This commit is contained in:
Aikar 2016-04-03 23:08:13 -04:00
parent 1b3ca5485c
commit 94fd16aa4a

View file

@ -1,4 +1,4 @@
From b8ee28113566b07b8db3ff7a12f4cd23f5436fb6 Mon Sep 17 00:00:00 2001 From b1eaaca9b59ca471b92ae67aeb900658bfc5f6e9 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sat, 13 Sep 2014 23:14:43 -0400 Date: Sat, 13 Sep 2014 23:14:43 -0400
Subject: [PATCH] Configurable Keep Spawn Loaded range per world Subject: [PATCH] Configurable Keep Spawn Loaded range per world
@ -6,7 +6,7 @@ Subject: [PATCH] Configurable Keep Spawn Loaded range per world
This lets you disable it for some worlds and lower it for others. This lets you disable it for some worlds and lower it for others.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index be21c0f..0b57f1d 100644 index be21c0f..275bf10 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -312,4 +312,10 @@ public class PaperWorldConfig { @@ -312,4 +312,10 @@ public class PaperWorldConfig {
@ -16,7 +16,7 @@ index be21c0f..0b57f1d 100644
+ +
+ public short keepLoadedRange; + public short keepLoadedRange;
+ private void keepLoadedRange() { + private void keepLoadedRange() {
+ keepLoadedRange = (short) getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 8)); + keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 8)) * 16);
+ log( "Keep Spawn Loaded Range: " + (keepLoadedRange/16)); + log( "Keep Spawn Loaded Range: " + (keepLoadedRange/16));
+ } + }
} }