diff --git a/patches/server/0109-Make-slow-login-timeout-configurable.patch b/patches/server/0109-Make-slow-login-timeout-configurable.patch new file mode 100644 index 0000000..49caba3 --- /dev/null +++ b/patches/server/0109-Make-slow-login-timeout-configurable.patch @@ -0,0 +1,54 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Martijn Muijsers +Date: Sat, 24 Dec 2022 22:50:13 +0100 +Subject: [PATCH] Make slow login timeout configurable + +License: AGPL-3.0 (https://www.gnu.org/licenses/agpl-3.0.html) +Gale - https://galemc.org + +diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +index 2ed3f42b1e487374287d033ac634a922a5ef37bd..b4458776442df2b1e42e143e0b217973618d0af8 100644 +--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java ++++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +@@ -37,6 +37,7 @@ import net.minecraft.util.Crypt; + import net.minecraft.util.CryptException; + import net.minecraft.util.RandomSource; + import org.apache.commons.lang3.Validate; ++import org.galemc.gale.configuration.GaleGlobalConfiguration; + import org.slf4j.Logger; + + // CraftBukkit start +@@ -96,7 +97,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, + } + } + +- if (this.tick++ == 600) { ++ if (this.tick++ >= GaleGlobalConfiguration.get().misc.premiumAccountSlowLoginTimeout) { // Gale - make slow login timeout configurable + this.disconnect(Component.translatable("multiplayer.disconnect.slow_login")); + } + +diff --git a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java +index d87db127a13c37cd4d9e0ff2f0a5b5387c5fbb0b..b25c861d7ea1c167c27fb30fceaf4bbca899a666 100644 +--- a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java ++++ b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java +@@ -42,6 +42,20 @@ public class GaleGlobalConfiguration extends ConfigurationPart { + public Misc misc; + public class Misc extends ConfigurationPart { + ++ // Gale start - make slow login timeout configurable ++ /** ++ * The maximum time that a premium account login can take. ++ * If this time is exceeded, the connection is closed. ++ * Given in ticks. ++ * Any value < 1 uses the default timeout, which is currently 600 ticks (30 seconds). ++ * ++ */ ++ public int premiumAccountSlowLoginTimeout = 600; ++ // Gale end - make slow login timeout configurable ++ + public IncludeInTimingsReport includeInTimingsReport; + + public class IncludeInTimingsReport extends ConfigurationPart { diff --git a/patches/server/0109-Prevent-entities-random-strolling-into-non-ticking-c.patch b/patches/server/0110-Prevent-entities-random-strolling-into-non-ticking-c.patch similarity index 100% rename from patches/server/0109-Prevent-entities-random-strolling-into-non-ticking-c.patch rename to patches/server/0110-Prevent-entities-random-strolling-into-non-ticking-c.patch diff --git a/patches/server/0110-CraftBukkit-UUID-to-world-map.patch b/patches/server/0111-CraftBukkit-UUID-to-world-map.patch similarity index 100% rename from patches/server/0110-CraftBukkit-UUID-to-world-map.patch rename to patches/server/0111-CraftBukkit-UUID-to-world-map.patch diff --git a/patches/server/0111-Specific-interval-TPS-API.patch b/patches/server/0112-Specific-interval-TPS-API.patch similarity index 100% rename from patches/server/0111-Specific-interval-TPS-API.patch rename to patches/server/0112-Specific-interval-TPS-API.patch diff --git a/patches/server/0112-5-second-TPS-average.patch b/patches/server/0113-5-second-TPS-average.patch similarity index 100% rename from patches/server/0112-5-second-TPS-average.patch rename to patches/server/0113-5-second-TPS-average.patch diff --git a/patches/server/0113-Measure-last-tick-time.patch b/patches/server/0114-Measure-last-tick-time.patch similarity index 100% rename from patches/server/0113-Measure-last-tick-time.patch rename to patches/server/0114-Measure-last-tick-time.patch diff --git a/patches/server/0114-Last-tick-time-API.patch b/patches/server/0115-Last-tick-time-API.patch similarity index 100% rename from patches/server/0114-Last-tick-time-API.patch rename to patches/server/0115-Last-tick-time-API.patch diff --git a/patches/server/0115-Show-last-tick-time-in-tps-command.patch b/patches/server/0116-Show-last-tick-time-in-tps-command.patch similarity index 97% rename from patches/server/0115-Show-last-tick-time-in-tps-command.patch rename to patches/server/0116-Show-last-tick-time-in-tps-command.patch index 5c680d4..68d8715 100644 --- a/patches/server/0115-Show-last-tick-time-in-tps-command.patch +++ b/patches/server/0116-Show-last-tick-time-in-tps-command.patch @@ -23,10 +23,10 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java -index d87db127a13c37cd4d9e0ff2f0a5b5387c5fbb0b..3a6f739a59b7f9f6ff6baee255eafa6abe00579f 100644 +index b25c861d7ea1c167c27fb30fceaf4bbca899a666..ecbfab92d027ea1e5a3963f88892b34551324609 100644 --- a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java +++ b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java -@@ -84,6 +84,14 @@ public class GaleGlobalConfiguration extends ConfigurationPart { +@@ -98,6 +98,14 @@ public class GaleGlobalConfiguration extends ConfigurationPart { } diff --git a/patches/server/0116-Increase-time-statistics-in-intervals.patch b/patches/server/0117-Increase-time-statistics-in-intervals.patch similarity index 98% rename from patches/server/0116-Increase-time-statistics-in-intervals.patch rename to patches/server/0117-Increase-time-statistics-in-intervals.patch index fb9f50a..7b18661 100644 --- a/patches/server/0116-Increase-time-statistics-in-intervals.patch +++ b/patches/server/0117-Increase-time-statistics-in-intervals.patch @@ -87,7 +87,7 @@ index 68247b9daf710c71f84e1fae9d91efed151d39aa..92b30f5293e80e078d8a1a740d22367e int i = 29999999; diff --git a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java -index 3a6f739a59b7f9f6ff6baee255eafa6abe00579f..7d05cccb6a2c6af8e8c78bd6045c80148ea2c1a2 100644 +index ecbfab92d027ea1e5a3963f88892b34551324609..ff464fbc0dfe2d9b7d957b574254f2ea8a3545f2 100644 --- a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java +++ b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java @@ -27,7 +27,29 @@ public class GaleGlobalConfiguration extends ConfigurationPart { diff --git a/patches/server/0117-For-collision-check-has-physics-before-same-vehicle.patch b/patches/server/0118-For-collision-check-has-physics-before-same-vehicle.patch similarity index 100% rename from patches/server/0117-For-collision-check-has-physics-before-same-vehicle.patch rename to patches/server/0118-For-collision-check-has-physics-before-same-vehicle.patch diff --git a/patches/server/0118-Skip-negligible-planar-movement-multiplication.patch b/patches/server/0119-Skip-negligible-planar-movement-multiplication.patch similarity index 100% rename from patches/server/0118-Skip-negligible-planar-movement-multiplication.patch rename to patches/server/0119-Skip-negligible-planar-movement-multiplication.patch diff --git a/patches/server/0119-Reduce-RandomSource-instances.patch b/patches/server/0120-Reduce-RandomSource-instances.patch similarity index 100% rename from patches/server/0119-Reduce-RandomSource-instances.patch rename to patches/server/0120-Reduce-RandomSource-instances.patch diff --git a/patches/server/0120-Server-thread-priority-environment-variable.patch b/patches/server/0121-Server-thread-priority-environment-variable.patch similarity index 100% rename from patches/server/0120-Server-thread-priority-environment-variable.patch rename to patches/server/0121-Server-thread-priority-environment-variable.patch diff --git a/patches/server/0121-Thread-safety-annotations.patch b/patches/server/0122-Thread-safety-annotations.patch similarity index 100% rename from patches/server/0121-Thread-safety-annotations.patch rename to patches/server/0122-Thread-safety-annotations.patch diff --git a/patches/server/0122-CPU-cores-estimation.patch b/patches/server/0123-CPU-cores-estimation.patch similarity index 98% rename from patches/server/0122-CPU-cores-estimation.patch rename to patches/server/0123-CPU-cores-estimation.patch index 737975f..7af7829 100644 --- a/patches/server/0122-CPU-cores-estimation.patch +++ b/patches/server/0123-CPU-cores-estimation.patch @@ -68,10 +68,10 @@ index b9a799997e3475117ab91d7f3edb5f2f243a9f6b..e23fdd5ba09b50b7eef0ca4f36c54807 import org.yaml.snakeyaml.constructor.SafeConstructor; import org.yaml.snakeyaml.error.MarkedYAMLException; diff --git a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java -index 7d05cccb6a2c6af8e8c78bd6045c80148ea2c1a2..5b4f9956094f20daf9864b679b283448f357fecc 100644 +index ff464fbc0dfe2d9b7d957b574254f2ea8a3545f2..238e8da987540751c3fcc7c1d91f707fd1e1f927 100644 --- a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java +++ b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java -@@ -125,6 +125,7 @@ public class GaleGlobalConfiguration extends ConfigurationPart { +@@ -139,6 +139,7 @@ public class GaleGlobalConfiguration extends ConfigurationPart { public boolean setBlockInFarChunk = true; // Gale - Purpur - do not log setBlock in far chunks public boolean unrecognizedRecipes = false; // Gale - Purpur - do not log unrecognized recipes public boolean legacyMaterialInitialization = false; // Gale - Purpur - do not log legacy Material initialization diff --git a/patches/server/0123-Mutex-utility.patch b/patches/server/0124-Mutex-utility.patch similarity index 100% rename from patches/server/0123-Mutex-utility.patch rename to patches/server/0124-Mutex-utility.patch diff --git a/patches/server/0124-Paired-lock-and-condition-utility.patch b/patches/server/0125-Paired-lock-and-condition-utility.patch similarity index 100% rename from patches/server/0124-Paired-lock-and-condition-utility.patch rename to patches/server/0125-Paired-lock-and-condition-utility.patch diff --git a/patches/server/0125-Unterminable-executor-utility.patch b/patches/server/0126-Unterminable-executor-utility.patch similarity index 100% rename from patches/server/0125-Unterminable-executor-utility.patch rename to patches/server/0126-Unterminable-executor-utility.patch diff --git a/patches/server/0126-FIFO-concurrent-queue-utility.patch b/patches/server/0127-FIFO-concurrent-queue-utility.patch similarity index 100% rename from patches/server/0126-FIFO-concurrent-queue-utility.patch rename to patches/server/0127-FIFO-concurrent-queue-utility.patch diff --git a/patches/server/0127-Base-thread-pools.patch b/patches/server/0128-Base-thread-pools.patch similarity index 99% rename from patches/server/0127-Base-thread-pools.patch rename to patches/server/0128-Base-thread-pools.patch index aabcba0..d19d71c 100644 --- a/patches/server/0127-Base-thread-pools.patch +++ b/patches/server/0128-Base-thread-pools.patch @@ -1899,7 +1899,7 @@ index 69acbab61a79c24312359a63086f9353d740113f..49ace73d901b6f55545bb21a93d026a0 } } catch (Exception ex) { diff --git a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java -index 5b4f9956094f20daf9864b679b283448f357fecc..a00c6ba256ddbcb6330e2b00ef361200df08036a 100644 +index 238e8da987540751c3fcc7c1d91f707fd1e1f927..17b855482c00f6dedef07df8b8ba044088a12eaf 100644 --- a/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java +++ b/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java @@ -2,11 +2,14 @@ diff --git a/patches/server/0128-Non-blocking-PooledObjects.patch b/patches/server/0129-Non-blocking-PooledObjects.patch similarity index 100% rename from patches/server/0128-Non-blocking-PooledObjects.patch rename to patches/server/0129-Non-blocking-PooledObjects.patch