spigot/CraftBukkit-Patches/0026-Fully-Disable-Snooper-When-Not-Required.patch
2020-06-26 19:18:18 +10:00

27 lines
1.1 KiB
Diff

From 905cd59cbae8615ccb1bb734cfb45dcf43f447cc 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 c6b4c020a..48e432eb3 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -991,11 +991,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
this.methodProfiler.enter("snooper");
- if (!this.snooper.d() && this.ticks > 100) {
+ if (((DedicatedServer) this).getDedicatedServerProperties().snooperEnabled && !this.snooper.d() && this.ticks > 100) { // Spigot
this.snooper.a();
}
- if (this.ticks % 6000 == 0) {
+ if (((DedicatedServer) this).getDedicatedServerProperties().snooperEnabled && this.ticks % 6000 == 0) { // Spigot
this.snooper.b();
}
--
2.25.1