mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 09:57:43 +01:00
Change default delay-chunk-unloads-by to 1 second
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
From 3962da09dfb390b3b7b5168632d58811adc6bb59 Mon Sep 17 00:00:00 2001
|
From b66568d3b618db54ac122476215adcd004fe49a5 Mon Sep 17 00:00:00 2001
|
||||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||||
Date: Fri, 25 Oct 2019 02:11:30 -0700
|
Date: Fri, 25 Oct 2019 02:11:30 -0700
|
||||||
Subject: [PATCH] Delay chunk unloads
|
Subject: [PATCH] Delay chunk unloads
|
||||||
@@ -185,7 +185,7 @@ index 4b87ca2ecb..346e2ebc79 100644
|
|||||||
public static <T> TicketType<T> a(String s, Comparator<T> comparator) {
|
public static <T> TicketType<T> a(String s, Comparator<T> comparator) {
|
||||||
return new TicketType<>(s, comparator, 0L);
|
return new TicketType<>(s, comparator, 0L);
|
||||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||||
index bb5ba4f137..1b95504491 100644
|
index bb5ba4f137..7a02d4e8a0 100644
|
||||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||||
@@ -4,6 +4,7 @@ import com.google.common.base.Throwables;
|
@@ -4,6 +4,7 @@ import com.google.common.base.Throwables;
|
||||||
@@ -203,7 +203,7 @@ index bb5ba4f137..1b95504491 100644
|
|||||||
+
|
+
|
||||||
+ public static int delayChunkUnloadsBy;
|
+ public static int delayChunkUnloadsBy;
|
||||||
+ private static void delayChunkUnloadsBy() {
|
+ private static void delayChunkUnloadsBy() {
|
||||||
+ delayChunkUnloadsBy = getInt("settings.delay-chunk-unloads-by", 10) * 20;
|
+ delayChunkUnloadsBy = getInt("settings.delay-chunk-unloads-by", 1) * 20;
|
||||||
+ if (delayChunkUnloadsBy >= 0) {
|
+ if (delayChunkUnloadsBy >= 0) {
|
||||||
+ TicketType.DELAYED_UNLOAD.loadPeriod = delayChunkUnloadsBy;
|
+ TicketType.DELAYED_UNLOAD.loadPeriod = delayChunkUnloadsBy;
|
||||||
+ }
|
+ }
|
||||||
|
|||||||
Reference in New Issue
Block a user