papermc/Spigot-Server-Patches/0010-Ability-to-disable-asynccatcher.patch

42 lines
1.7 KiB
Diff
Raw Normal View History

2015-05-28 05:11:18 +00:00
From b70a51538266e463d2f61265e8f241723a60e2aa Mon Sep 17 00:00:00 2001
2015-01-29 21:25:50 +00:00
From: Zach Brown <zach.brown@destroystokyo.com>
2015-03-08 01:16:09 +00:00
Date: Sat, 7 Mar 2015 20:46:54 -0600
Subject: [PATCH] Ability to disable asynccatcher
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
2015-05-28 05:11:18 +00:00
index 0e9d57f..c583a80 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
2015-05-28 05:11:18 +00:00
@@ -144,4 +144,14 @@ public class PaperSpigotConfig
2014-08-05 23:45:22 +00:00
{
2015-03-08 01:16:09 +00:00
babyZombieMovementSpeed = getDouble( "settings.baby-zombie-movement-speed", 0.5D ); // Player moves at 0.1F, for reference
}
+
+ public static boolean asyncCatcherFeature;
+ private static void asyncCatcherFeature()
+ {
+ asyncCatcherFeature = getBoolean( "settings.async-plugin-bad-magic-catcher", true );
2015-03-08 01:16:09 +00:00
+ if ( !asyncCatcherFeature )
+ {
+ Bukkit.getLogger().log( Level.INFO, "Disabling async plugin bad ju-ju catcher, this is not recommended and may cause issues" );
+ }
+ }
}
diff --git a/src/main/java/org/spigotmc/AsyncCatcher.java b/src/main/java/org/spigotmc/AsyncCatcher.java
2014-08-05 23:45:22 +00:00
index 4b3aa85..f7e8d16 100644
--- a/src/main/java/org/spigotmc/AsyncCatcher.java
+++ b/src/main/java/org/spigotmc/AsyncCatcher.java
2014-08-05 23:45:22 +00:00
@@ -5,7 +5,7 @@ import net.minecraft.server.MinecraftServer;
public class AsyncCatcher
{
- public static boolean enabled = true;
2014-08-05 23:45:22 +00:00
+ public static boolean enabled = org.github.paperspigot.PaperSpigotConfig.asyncCatcherFeature; // PaperSpigot - Allow disabling of AsyncCatcher from PaperSpigotConfig
public static void catchOp(String reason)
{
--
2015-05-28 05:11:18 +00:00
2.4.1.windows.1