Fixed catch in Placeholder registering

This commit is contained in:
Rsl1122 2019-10-04 20:22:57 +03:00
parent 84853ccec2
commit 177c0af7d2

View File

@ -83,17 +83,17 @@ public class Plan extends BukkitPlugin implements PlanPlugin {
}
private void registerPlaceholderAPIExtension() {
try {
if (Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
runnableFactory.create("Placeholders Registrar", new AbsRunnable() {
@Override
public void run() {
if (Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
runnableFactory.create("Placeholders Registrar", new AbsRunnable() {
@Override
public void run() {
try {
PlaceholderRegistrar.register(system, errorHandler);
} catch (Exception | NoClassDefFoundError | NoSuchMethodError failed) {
logger.warn("Failed to register PlaceholderAPI placeholders: " + failed.toString());
}
}).runTask();
}
} catch (Exception | NoClassDefFoundError | NoSuchMethodError failed) {
logger.warn("Failed to register PlaceholderAPI placeholders: " + failed.toString());
}
}).runTask();
}
}