mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2025-09-05 17:07:06 +02:00
Added unregisterExpansion method
This commit is contained in:
@@ -274,13 +274,20 @@ public class PlaceholderAPI {
|
||||
if (value instanceof PlaceholderExpansion) {
|
||||
PlaceholderExpansion ex = (PlaceholderExpansion) value;
|
||||
if (!ex.persist()) {
|
||||
Bukkit.getPluginManager().callEvent(new ExpansionUnregisterEvent(ex));
|
||||
unregisterPlaceholderHook(key);
|
||||
unregisterExpansion(ex);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static boolean unregisterExpansion(PlaceholderExpansion ex) {
|
||||
if (unregisterPlaceholderHook(ex.getIdentifier())) {
|
||||
Bukkit.getPluginManager().callEvent(new ExpansionUnregisterEvent(ex));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static Pattern getPlaceholderPattern() {
|
||||
return PLACEHOLDER_PATTERN;
|
||||
}
|
||||
|
Reference in New Issue
Block a user