This commit is contained in:
Jesse Boyd 2018-05-23 16:16:09 +10:00
parent d58a8549cb
commit c6605ce587
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
3 changed files with 5 additions and 4 deletions

View File

@ -120,7 +120,7 @@ public class FaweBukkit implements IFawe, Listener {
debug(" - This is only a recommendation");
debug("==============================");
}
if (Bukkit.getVersion().contains("git-Paper") && Settings.IMP.EXPERIMENTAL.DYNAMIC_CHUNK_RENDERING) {
if (Bukkit.getVersion().contains("git-Paper") && Settings.IMP.EXPERIMENTAL.DYNAMIC_CHUNK_RENDERING > 1) {
new RenderListener(plugin);
}
try {

View File

@ -1,6 +1,7 @@
package com.boydti.fawe.bukkit.listener;
import com.boydti.fawe.Fawe;
import com.boydti.fawe.config.Settings;
import com.boydti.fawe.object.FawePlayer;
import com.boydti.fawe.util.TaskManager;
import java.util.Iterator;
@ -76,7 +77,7 @@ public class RenderListener implements Listener {
public void setViewDistance(Player player, int value) {
UUID uuid = player.getUniqueId();
if (value == 10) {
if (value == Settings.IMP.EXPERIMENTAL.DYNAMIC_CHUNK_RENDERING) {
views.remove(uuid);
} else {
int[] val = views.get(uuid);
@ -100,7 +101,7 @@ public class RenderListener implements Listener {
public int getViewDistance(Player player) {
int[] value = views.get(player.getUniqueId());
return value == null ? 10 : value[0];
return value == null ? Settings.IMP.EXPERIMENTAL.DYNAMIC_CHUNK_RENDERING : value[0];
}
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)

View File

@ -313,7 +313,7 @@ public class Settings extends Config {
" - Based on tps and player movement",
" - Please provide feedback",
})
public boolean DYNAMIC_CHUNK_RENDERING = false;
public int DYNAMIC_CHUNK_RENDERING = -1;
@Comment({
"[SAFE] Allows brushes to be persistent",
})