From de8917492942bb98487d65a8aa62e4f55b5d13fd Mon Sep 17 00:00:00 2001 From: Boy Date: Wed, 8 May 2024 15:57:30 +0200 Subject: [PATCH] fix: try-catch handleCompatibility --- src/main/java/io/th0rgal/protectionlib/ProtectionLib.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/th0rgal/protectionlib/ProtectionLib.java b/src/main/java/io/th0rgal/protectionlib/ProtectionLib.java index a0b5255..fb2e615 100644 --- a/src/main/java/io/th0rgal/protectionlib/ProtectionLib.java +++ b/src/main/java/io/th0rgal/protectionlib/ProtectionLib.java @@ -76,7 +76,11 @@ private static void handleCompatibility(String pluginName, JavaPlugin mainPlugin Plugin plugin = Bukkit.getPluginManager().getPlugin(pluginName); if (plugin != null) { if (pluginName.equals("Factions") && !checkFactionsCompat()) return; - compatibilities.add(constructor.create(mainPlugin, plugin)); + try { + compatibilities.add(constructor.create(mainPlugin, plugin)); + } catch (Exception e) { + if (debug) e.printStackTrace(); + } } }