PaperSpigot-Parent/Spigot-Server-Patches/0014-Ability-to-disable-asynccatcher.patch

41 lines
1.7 KiB
Diff
Raw Normal View History

2014-08-06 01:45:22 +02:00
From 1ef0a28bb134bad8a4cab88ebb2669baad054bf6 Mon Sep 17 00:00:00 2001
From: Zach Brown <Zbob750@live.com>
2014-08-06 01:45:22 +02:00
Date: Tue, 5 Aug 2014 17:39: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
2014-08-06 01:45:22 +02:00
index f4acbb3..2cc159b 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
2014-08-06 01:45:22 +02:00
@@ -143,4 +143,13 @@ public class PaperSpigotConfig
{
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 );
2014-08-06 01:45:22 +02:00
+ if (!asyncCatcherFeature) {
+ Bukkit.getLogger().log( Level.INFO, "Disabling async plugin bad ju-ju catcher, this may be bad depending on your plugins" );
+ }
+ }
}
diff --git a/src/main/java/org/spigotmc/AsyncCatcher.java b/src/main/java/org/spigotmc/AsyncCatcher.java
2014-08-06 01:45:22 +02:00
index 4b3aa85..f7e8d16 100644
--- a/src/main/java/org/spigotmc/AsyncCatcher.java
+++ b/src/main/java/org/spigotmc/AsyncCatcher.java
2014-08-06 01:45:22 +02:00
@@ -5,7 +5,7 @@ import net.minecraft.server.MinecraftServer;
public class AsyncCatcher
{
- public static boolean enabled = true;
2014-08-06 01:45:22 +02:00
+ public static boolean enabled = org.github.paperspigot.PaperSpigotConfig.asyncCatcherFeature; // PaperSpigot - Allow disabling of AsyncCatcher from PaperSpigotConfig
public static void catchOp(String reason)
{
--
1.9.1