diff --git a/src/main/java/meteordevelopment/meteorclient/MeteorClient.java b/src/main/java/meteordevelopment/meteorclient/MeteorClient.java index 46f64dd540..e6704a22d0 100644 --- a/src/main/java/meteordevelopment/meteorclient/MeteorClient.java +++ b/src/main/java/meteordevelopment/meteorclient/MeteorClient.java @@ -97,7 +97,6 @@ public void onInitializeClient() { AddonManager.init(); // Register event handlers - EVENT_BUS.registerLambdaFactory(ADDON.getPackage() , (lookupInMethod, klass) -> (MethodHandles.Lookup) lookupInMethod.invoke(null, klass, MethodHandles.lookup())); AddonManager.ADDONS.forEach(addon -> { try { EVENT_BUS.registerLambdaFactory(addon.getPackage(), (lookupInMethod, klass) -> (MethodHandles.Lookup) lookupInMethod.invoke(null, klass, MethodHandles.lookup())); diff --git a/src/main/java/meteordevelopment/meteorclient/addons/AddonManager.java b/src/main/java/meteordevelopment/meteorclient/addons/AddonManager.java index 1678f86d59..54af1c4d00 100644 --- a/src/main/java/meteordevelopment/meteorclient/addons/AddonManager.java +++ b/src/main/java/meteordevelopment/meteorclient/addons/AddonManager.java @@ -58,6 +58,8 @@ public String getCommit() { for (Person author : metadata.getAuthors()) { MeteorClient.ADDON.authors[i++] = author.getName(); } + + ADDONS.add(MeteorClient.ADDON); } // Addons diff --git a/src/main/java/meteordevelopment/meteorclient/gui/screens/ModuleScreen.java b/src/main/java/meteordevelopment/meteorclient/gui/screens/ModuleScreen.java index d106a5604d..e3a5d95ad2 100644 --- a/src/main/java/meteordevelopment/meteorclient/gui/screens/ModuleScreen.java +++ b/src/main/java/meteordevelopment/meteorclient/gui/screens/ModuleScreen.java @@ -5,6 +5,7 @@ package meteordevelopment.meteorclient.gui.screens; +import meteordevelopment.meteorclient.MeteorClient; import meteordevelopment.meteorclient.events.meteor.ActiveModulesChangedEvent; import meteordevelopment.meteorclient.events.meteor.ModuleBindChangedEvent; import meteordevelopment.meteorclient.gui.GuiTheme; @@ -93,12 +94,17 @@ public void initWidgets() { // Bottom WHorizontalList bottom = add(theme.horizontalList()).expandX().widget(); - // Active + // Active bottom.add(theme.label("Active: ")); active = bottom.add(theme.checkbox(module.isActive())).expandCellX().widget(); active.action = () -> { if (module.isActive() != active.checked) module.toggle(); }; + + if (module.addon != null && module.addon != MeteorClient.ADDON) { + bottom.add(theme.label("From: ")).right().widget(); + bottom.add(theme.label(module.addon.name).color(theme.textSecondaryColor())).right().widget(); + } } @Override diff --git a/src/main/java/meteordevelopment/meteorclient/systems/modules/Module.java b/src/main/java/meteordevelopment/meteorclient/systems/modules/Module.java index 2b20b44d57..1f1a77f290 100644 --- a/src/main/java/meteordevelopment/meteorclient/systems/modules/Module.java +++ b/src/main/java/meteordevelopment/meteorclient/systems/modules/Module.java @@ -6,6 +6,8 @@ package meteordevelopment.meteorclient.systems.modules; import meteordevelopment.meteorclient.MeteorClient; +import meteordevelopment.meteorclient.addons.AddonManager; +import meteordevelopment.meteorclient.addons.MeteorAddon; import meteordevelopment.meteorclient.gui.GuiTheme; import meteordevelopment.meteorclient.gui.widgets.WWidget; import meteordevelopment.meteorclient.settings.Settings; @@ -33,6 +35,7 @@ public abstract class Module implements ISerializable, Comparable