updated managers to make more sense, removed old

This commit is contained in:
Sxtanna
2020-07-24 14:30:57 -04:00
parent 60a74258ec
commit f3ba9d588e
21 changed files with 996 additions and 990 deletions

View File

@@ -108,8 +108,7 @@ public abstract class PlaceholderExpansion extends PlaceholderHook {
* @return true if this hook meets all the requirements to register
*/
public boolean canRegister() {
return getRequiredPlugin() == null
|| Bukkit.getPluginManager().getPlugin(getRequiredPlugin()) != null;
return getRequiredPlugin() == null || Bukkit.getPluginManager().getPlugin(getRequiredPlugin()) != null;
}
/**
@@ -119,7 +118,7 @@ public abstract class PlaceholderExpansion extends PlaceholderHook {
*/
public boolean register() {
Validate.notNull(getIdentifier(), "Placeholder identifier can not be null!");
return PlaceholderAPI.registerExpansion(this);
return canRegister() && getPlaceholderAPI().getLocalExpansionManager().register(this);
}
/**