Make client use most recent loader interface
All checks were successful
/ Build BaseBand (push) Successful in 2m46s
/ Build BaseBand Loader (push) Successful in 1m52s

This commit is contained in:
Daniella / Tove 2024-10-14 01:37:09 +02:00
parent c3f6505a8f
commit b534b92456
Signed by: TudbuT
GPG key ID: B3CF345217F202D3
2 changed files with 4 additions and 3 deletions

View file

@ -11,10 +11,10 @@ public class LoadHandler {
public static TCN data = new TCN(); public static TCN data = new TCN();
public static void loaded(Map<String, String> data) { public static void loaded(Map<String, String> data, Class<?> loaderClass) {
LoadHandler.data = TCN.readMap(data); LoadHandler.data = TCN.readMap(data);
try { 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) { } catch (Exception e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }

View file

@ -1,5 +1,6 @@
package de.com.baseband.launcher.classloader; package de.com.baseband.launcher.classloader;
import de.com.baseband.launcher.Tweaker;
import de.com.baseband.launcher.url.URLWrapper; import de.com.baseband.launcher.url.URLWrapper;
import de.com.baseband.launcher.util.Util; import de.com.baseband.launcher.util.Util;
import de.tudbut.parsing.TCN; import de.tudbut.parsing.TCN;
@ -92,7 +93,7 @@ public class CustomClassLoader extends ClassLoader implements Util {
public void informClient(TCN clientData) { public void informClient(TCN clientData) {
LOGGER.info("Informing client that it has been loaded."); LOGGER.info("Informing client that it has been loaded.");
try { 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) { } catch (Exception e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }