forked from Upstream/mmocore
Fixed MythicDungeons throwing an error message
This commit is contained in:
parent
fa40f3707d
commit
d0b27c84b2
@ -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) {
|
||||
|
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user