mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2024-11-18 00:46:55 +01:00
Resolve expansion loading bug.
This commit is contained in:
parent
efc6a6337b
commit
838f947a05
@ -37,8 +37,8 @@ import org.bukkit.event.Listener;
|
|||||||
|
|
||||||
public final class ExpansionManager {
|
public final class ExpansionManager {
|
||||||
|
|
||||||
private PlaceholderAPIPlugin plugin;
|
|
||||||
private final Map<String, PlaceholderExpansion> cache = new HashMap<>();
|
private final Map<String, PlaceholderExpansion> cache = new HashMap<>();
|
||||||
|
private PlaceholderAPIPlugin plugin;
|
||||||
|
|
||||||
public ExpansionManager(PlaceholderAPIPlugin instance) {
|
public ExpansionManager(PlaceholderAPIPlugin instance) {
|
||||||
plugin = instance;
|
plugin = instance;
|
||||||
@ -108,8 +108,9 @@ public final class ExpansionManager {
|
|||||||
VersionSpecific nms = (VersionSpecific) expansion;
|
VersionSpecific nms = (VersionSpecific) expansion;
|
||||||
if (!nms.isCompatibleWith(PlaceholderAPIPlugin.getServerVersion())) {
|
if (!nms.isCompatibleWith(PlaceholderAPIPlugin.getServerVersion())) {
|
||||||
plugin.getLogger()
|
plugin.getLogger()
|
||||||
.info("Your server version is not compatible with expansion: " + expansion.getIdentifier()
|
.info(
|
||||||
+ " version: " + expansion.getVersion());
|
"Your server version is not compatible with expansion: " + expansion.getIdentifier()
|
||||||
|
+ " version: " + expansion.getVersion());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -178,7 +179,7 @@ public final class ExpansionManager {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
PlaceholderExpansion ex = null;
|
PlaceholderExpansion ex = null;
|
||||||
if (!klass.isAssignableFrom(PlaceholderExpansion.class)) {
|
if (!PlaceholderExpansion.class.isAssignableFrom(klass)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
@ -194,7 +195,8 @@ public final class ExpansionManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Throwable t) {
|
} 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());
|
plugin.getLogger().severe(t.getMessage());
|
||||||
}
|
}
|
||||||
return ex;
|
return ex;
|
||||||
|
Loading…
Reference in New Issue
Block a user