spigot/CraftBukkit-Patches/0025-Fully-Disable-Snooper-When-Not-Required.patch
2021-08-15 08:08:25 +10:00

27 lines
1.1 KiB
Diff

From 7c8b6e0b166b4c1c8a5a32b7ce538ef94a2cf7a6 Mon Sep 17 00:00:00 2001
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
index 3690f1b3b..6f134c6ad 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1199,11 +1199,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
this.profiler.enter("snooper");
- if (!this.snooper.d() && this.tickCount > 100) {
+ if (((DedicatedServer) this).getDedicatedServerProperties().snooperEnabled && !this.snooper.d() && this.tickCount > 100) { // Spigot
this.snooper.a();
}
- if (this.tickCount % 6000 == 0) {
+ if (((DedicatedServer) this).getDedicatedServerProperties().snooperEnabled && this.tickCount % 6000 == 0) { // Spigot
this.snooper.b();
}
--
2.25.1