diff --git a/MMOCore-API/src/main/java/net/Indyuce/mmocore/MMOCore.java b/MMOCore-API/src/main/java/net/Indyuce/mmocore/MMOCore.java index d364c729..e4a6fcaa 100644 --- a/MMOCore-API/src/main/java/net/Indyuce/mmocore/MMOCore.java +++ b/MMOCore-API/src/main/java/net/Indyuce/mmocore/MMOCore.java @@ -216,7 +216,7 @@ public class MMOCore extends MMOPlugin { try { String partyPluginName = UtilityMethods.enumName(getConfig().getString("party-plugin")); PartyModuleType moduleType = PartyModuleType.valueOf(partyPluginName); - Validate.isTrue(moduleType.isValid(), "Plugin '" + moduleType.name() + "' is not installed"); + Validate.isTrue(moduleType.isValid(), "Plugin " + moduleType.getPluginName() + " is not installed"); partyModule = moduleType.provideModule(); getLogger().log(Level.INFO, "Hooked parties onto " + moduleType.getPluginName()); } catch (Throwable exception) { diff --git a/MMOCore-API/src/main/java/net/Indyuce/mmocore/party/PartyModuleType.java b/MMOCore-API/src/main/java/net/Indyuce/mmocore/party/PartyModuleType.java index cd5b6ec4..fac14c2e 100644 --- a/MMOCore-API/src/main/java/net/Indyuce/mmocore/party/PartyModuleType.java +++ b/MMOCore-API/src/main/java/net/Indyuce/mmocore/party/PartyModuleType.java @@ -12,7 +12,13 @@ public enum PartyModuleType { DUNGEONSXL("DungeonsXL", DungeonsXLPartyModule::new), HEROES("Heroes", HeroesPartyModule::new), MCMMO("mcMMO", McMMOPartyModule::new), - MYTHICDUNGEONS_INJECT("MythicDungeons", MythicDungeonsPartyInjector::new), + MYTHICDUNGEONS_INJECT("MythicDungeons", () -> { + try { + return MythicDungeonsPartyInjector.class.getConstructor().newInstance(); + } catch (Exception exception) { + throw new RuntimeException(exception); + } + }), MYTHICDUNGEONS("MythicDungeons", MythicDungeonsPartyModule::new), OBTEAM("OBTeam", OBTeamPartyModule::new), PARTY_AND_FRIENDS("PartyAndFriends", PAFPartyModule::new),