mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2024-11-18 00:46:55 +01:00
Call ExpansionUnregisterEvent when an expansion is unregistered
This commit is contained in:
parent
3b136b7aa2
commit
bec4782b40
@ -20,6 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
package me.clip.placeholderapi;
|
package me.clip.placeholderapi;
|
||||||
|
|
||||||
|
import me.clip.placeholderapi.events.ExpansionUnregisterEvent;
|
||||||
import me.clip.placeholderapi.events.PlaceholderHookUnloadEvent;
|
import me.clip.placeholderapi.events.PlaceholderHookUnloadEvent;
|
||||||
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
||||||
import me.clip.placeholderapi.expansion.Relational;
|
import me.clip.placeholderapi.expansion.Relational;
|
||||||
@ -273,7 +274,7 @@ public class PlaceholderAPI {
|
|||||||
if (value instanceof PlaceholderExpansion) {
|
if (value instanceof PlaceholderExpansion) {
|
||||||
PlaceholderExpansion ex = (PlaceholderExpansion) value;
|
PlaceholderExpansion ex = (PlaceholderExpansion) value;
|
||||||
if (!ex.persist()) {
|
if (!ex.persist()) {
|
||||||
Bukkit.getPluginManager().callEvent(new PlaceholderHookUnloadEvent(key, value));
|
Bukkit.getPluginManager().callEvent(new ExpansionUnregisterEvent(ex));
|
||||||
unregisterPlaceholderHook(key);
|
unregisterPlaceholderHook(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user