Fixed MythicDungeons throwing an error message

This commit is contained in:
Jules 2024-07-26 16:39:15 -07:00
parent fa40f3707d
commit d0b27c84b2
2 changed files with 8 additions and 2 deletions

View File

@ -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) {

View File

@ -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),