From 838f947a05dac3eba494083bab10ff6c8f9da7ec Mon Sep 17 00:00:00 2001 From: Mitchell Cook Date: Mon, 16 Jul 2018 17:21:33 +1000 Subject: [PATCH] Resolve expansion loading bug. --- .../placeholderapi/expansion/ExpansionManager.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/me/clip/placeholderapi/expansion/ExpansionManager.java b/src/main/java/me/clip/placeholderapi/expansion/ExpansionManager.java index 2a497ff..95cf8c8 100644 --- a/src/main/java/me/clip/placeholderapi/expansion/ExpansionManager.java +++ b/src/main/java/me/clip/placeholderapi/expansion/ExpansionManager.java @@ -37,8 +37,8 @@ import org.bukkit.event.Listener; public final class ExpansionManager { - private PlaceholderAPIPlugin plugin; private final Map cache = new HashMap<>(); + private PlaceholderAPIPlugin plugin; public ExpansionManager(PlaceholderAPIPlugin instance) { plugin = instance; @@ -108,8 +108,9 @@ public final class ExpansionManager { VersionSpecific nms = (VersionSpecific) expansion; if (!nms.isCompatibleWith(PlaceholderAPIPlugin.getServerVersion())) { plugin.getLogger() - .info("Your server version is not compatible with expansion: " + expansion.getIdentifier() - + " version: " + expansion.getVersion()); + .info( + "Your server version is not compatible with expansion: " + expansion.getIdentifier() + + " version: " + expansion.getVersion()); return false; } } @@ -178,7 +179,7 @@ public final class ExpansionManager { return null; } PlaceholderExpansion ex = null; - if (!klass.isAssignableFrom(PlaceholderExpansion.class)) { + if (!PlaceholderExpansion.class.isAssignableFrom(klass)) { return null; } try { @@ -194,7 +195,8 @@ public final class ExpansionManager { } } } catch (Throwable t) { - plugin.getLogger().severe("Failed to init placeholder expansion from class: " + klass.getName()); + plugin.getLogger() + .severe("Failed to init placeholder expansion from class: " + klass.getName()); plugin.getLogger().severe(t.getMessage()); } return ex;