From b534b92456c41c1e92d827687763aae3a652dd1e Mon Sep 17 00:00:00 2001 From: TudbuT Date: Mon, 14 Oct 2024 01:37:09 +0200 Subject: [PATCH] Make client use most recent loader interface --- Client/src/main/java/de/com/baseband/prod/LoadHandler.java | 4 ++-- .../com/baseband/launcher/classloader/CustomClassLoader.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Client/src/main/java/de/com/baseband/prod/LoadHandler.java b/Client/src/main/java/de/com/baseband/prod/LoadHandler.java index ecc9e1a..16b329b 100644 --- a/Client/src/main/java/de/com/baseband/prod/LoadHandler.java +++ b/Client/src/main/java/de/com/baseband/prod/LoadHandler.java @@ -11,10 +11,10 @@ public class LoadHandler { public static TCN data = new TCN(); - public static void loaded(Map data) { + public static void loaded(Map data, Class loaderClass) { LoadHandler.data = TCN.readMap(data); try { - Class.forName("de.com.baseband.launcher.Tweaker").getMethod("loaded", Class.class).invoke(null, BaseBand.class); + loaderClass.getMethod("loaded", Class.class).invoke(null, BaseBand.class); } catch (Exception e) { throw new RuntimeException(e); } diff --git a/Loader/src/main/java/de/com/baseband/launcher/classloader/CustomClassLoader.java b/Loader/src/main/java/de/com/baseband/launcher/classloader/CustomClassLoader.java index c339931..576a38e 100644 --- a/Loader/src/main/java/de/com/baseband/launcher/classloader/CustomClassLoader.java +++ b/Loader/src/main/java/de/com/baseband/launcher/classloader/CustomClassLoader.java @@ -1,5 +1,6 @@ package de.com.baseband.launcher.classloader; +import de.com.baseband.launcher.Tweaker; import de.com.baseband.launcher.url.URLWrapper; import de.com.baseband.launcher.util.Util; import de.tudbut.parsing.TCN; @@ -92,7 +93,7 @@ public class CustomClassLoader extends ClassLoader implements Util { public void informClient(TCN clientData) { LOGGER.info("Informing client that it has been loaded."); try { - this.loadClass("de.com.baseband.prod.LoadHandler").getDeclaredMethod("loaded", Map.class).invoke(null, clientData.toMap()); + this.loadClass("de.com.baseband.prod.LoadHandler").getDeclaredMethod("loaded", Map.class, Class.class).invoke(null, clientData.toMap(), Tweaker.class); } catch (Exception e) { throw new RuntimeException(e); }