From 62e282cc0e8457ac7c7fcf0d4adb152ef222e45c Mon Sep 17 00:00:00 2001 From: darbyjack Date: Wed, 8 May 2019 15:36:57 -0500 Subject: [PATCH] Initial attempt at preventing EzPlaceholderHook from working. --- .../java/me/clip/placeholderapi/PlaceholderAPIPlugin.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/me/clip/placeholderapi/PlaceholderAPIPlugin.java b/src/main/java/me/clip/placeholderapi/PlaceholderAPIPlugin.java index 1f1573c..766fd8c 100644 --- a/src/main/java/me/clip/placeholderapi/PlaceholderAPIPlugin.java +++ b/src/main/java/me/clip/placeholderapi/PlaceholderAPIPlugin.java @@ -154,7 +154,7 @@ public class PlaceholderAPIPlugin extends JavaPlugin { enableCloud(); } setupMetrics(); - getServer().getScheduler().runTaskLater(this, this::checkHook, 20 * 30); + getServer().getScheduler().runTaskLater(this, this::checkHook, 40); } @Override @@ -193,8 +193,10 @@ public class PlaceholderAPIPlugin extends JavaPlugin { } catch (Exception ex) { author = "the author of the hook's plugin"; } - getLogger().warning(((EZPlaceholderHook) h).getPluginName() + " is currently using a deprecated method to hook into PlaceholderAPI. This will be disabled after the next update. " + + getLogger().severe(((EZPlaceholderHook) h).getPluginName() + " is currently using a deprecated method to hook into PlaceholderAPI. Placeholders for that plugin no longer work. " + "Please consult {author} and urge them to update it ASAP.".replace("{author}", author)); + // disable the hook on startup + PlaceholderAPI.unregisterPlaceholderHook(((EZPlaceholderHook) h).getPlaceholderName()); } }); }