spigot/CraftBukkit-Patches/0025-Fully-Disable-Snooper-When-Not-Required.patch

28 lines
1.1 KiB
Diff
Raw Normal View History

2021-07-07 00:00:00 +10:00
From cfc3a21320c6a9e87cf58a486da151978ffb57c4 Mon Sep 17 00:00:00 2001
2014-04-12 14:18:37 +10:00
From: agentk20 <agentkid20@gmail.com>
Date: Sat, 3 Aug 2013 19:28:48 +1000
Subject: [PATCH] Fully Disable Snooper When Not Required
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
2021-07-07 00:00:00 +10:00
index 9dc6c12ac..e6fc3b5a6 100644
2014-04-12 14:18:37 +10:00
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
2021-07-07 00:00:00 +10:00
@@ -1184,11 +1184,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
2018-07-15 10:00:00 +10:00
}
2021-06-11 15:00:00 +10:00
this.profiler.enter("snooper");
- if (!this.snooper.d() && this.tickCount > 100) {
+ if (((DedicatedServer) this).getDedicatedServerProperties().snooperEnabled && !this.snooper.d() && this.tickCount > 100) { // Spigot
2018-12-13 11:00:00 +11:00
this.snooper.a();
2014-04-12 14:18:37 +10:00
}
2021-06-11 15:00:00 +10:00
- if (this.tickCount % 6000 == 0) {
+ if (((DedicatedServer) this).getDedicatedServerProperties().snooperEnabled && this.tickCount % 6000 == 0) { // Spigot
2018-12-13 11:00:00 +11:00
this.snooper.b();
2014-04-12 14:18:37 +10:00
}
--
2.25.1
2014-04-12 14:18:37 +10:00