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

27 lines
1.1 KiB
Diff

From 793ae4551e6d58a27cdde5f83766ab0771881dd8 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 e8c5c55f1..b01191458 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -941,11 +941,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.20.1