papermc/CraftBukkit-Patches/0015-Ability-to-disable-asynccatcher.patch

48 lines
1.7 KiB
Diff
Raw Normal View History

From be690aa73e8c1d647493a5ff8b52005009bb5ee6 Mon Sep 17 00:00:00 2001
From: Zach Brown <Zbob750@live.com>
Date: Wed, 2 Jul 2014 22:34:04 -0500
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
index 5d309da..5cb3f91 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
@@ -120,4 +120,13 @@ public class PaperSpigotConfig
config.addDefault( path, def );
return config.getString( path, config.getString( path ) );
}
-}
\ No newline at end of file
+
+ public static boolean asyncCatcherFeature;
+ private static void asyncCatcherFeature()
+ {
+ asyncCatcherFeature = getBoolean( "settings.async-plugin-bad-magic-catcher", true );
+ if ( !asyncCatcherFeature ) {
+ Bukkit.getLogger().log( Level.INFO, "Disabling async plugin bad ju-ju catcher, this might be bad depending on your plugins" );
+ }
+ }
+}
diff --git a/src/main/java/org/spigotmc/AsyncCatcher.java b/src/main/java/org/spigotmc/AsyncCatcher.java
index 4b3aa85..c4312db 100644
--- a/src/main/java/org/spigotmc/AsyncCatcher.java
+++ b/src/main/java/org/spigotmc/AsyncCatcher.java
@@ -1,11 +1,12 @@
package org.spigotmc;
import net.minecraft.server.MinecraftServer;
+import org.github.paperspigot.PaperSpigotConfig; // PaperSpigot
public class AsyncCatcher
{
- public static boolean enabled = true;
+ public static boolean enabled = PaperSpigotConfig.asyncCatcherFeature; // PaperSpigot - AsyncCatcher override feature
public static void catchOp(String reason)
{
--
1.9.1