Fixed Placeholder Registration on Bukkit 1.14

This commit is contained in:
Rsl1122 2019-10-04 20:18:52 +03:00
parent 00de6e535e
commit 4c55c642bd

View File

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