Require official PhatLoots rather than cause errors, fixes #766

This commit is contained in:
PikaMug 2019-04-10 02:18:28 -04:00
parent 9857e8c203
commit 8c209e9b6f

View File

@ -133,7 +133,11 @@ public class Dependencies {
heroes = (Heroes) plugin.getServer().getPluginManager().getPlugin("Heroes");
}
if (isPluginAvailable("PhatLoots")) {
phatLoots = (PhatLoots) plugin.getServer().getPluginManager().getPlugin("PhatLoots");
try {
phatLoots = (PhatLoots) plugin.getServer().getPluginManager().getPlugin("PhatLoots");
} catch (NoClassDefFoundError e) {
plugin.getLogger().warning("Unofficial version of PhatLoots found. PhatLoots in Quests not enabled.");
}
}
if (isPluginAvailable("PlaceholderAPI")) {
placeholder = (PlaceholderAPIPlugin) plugin.getServer().getPluginManager().getPlugin("PlaceholderAPI");