From 10e10c151b200703dd647c6f1512e856e2d7f4ca Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Wed, 7 Aug 2024 13:35:22 +0200 Subject: [PATCH] Hotfix BauSystem --- .../src/de/steamwar/bausystem/BauSystem.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java index e0e4bb13..b37e8e8b 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java @@ -115,9 +115,12 @@ public class BauSystem extends JavaPlugin implements Listener { .map(s -> { try { return Class.forName(s, false, BauSystem.class.getClassLoader()); - } catch (ClassNotFoundException e) { - Bukkit.shutdown(); - throw new SecurityException(e.getMessage(), e); + } catch (ClassNotFoundException | NoClassDefFoundError e) { + if (e.getMessage().equals(s)) { + Bukkit.shutdown(); + throw new SecurityException(e.getMessage(), e); + } + return null; } }) .filter(Objects::nonNull)