Call ExpansionUnregisterEvent when an expansion is unregistered

This commit is contained in:
extendedclip 2018-03-24 12:42:45 -04:00
parent 3b136b7aa2
commit bec4782b40
1 changed files with 2 additions and 1 deletions

View File

@ -20,6 +20,7 @@
*/
package me.clip.placeholderapi;
import me.clip.placeholderapi.events.ExpansionUnregisterEvent;
import me.clip.placeholderapi.events.PlaceholderHookUnloadEvent;
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import me.clip.placeholderapi.expansion.Relational;
@ -273,7 +274,7 @@ public class PlaceholderAPI {
if (value instanceof PlaceholderExpansion) {
PlaceholderExpansion ex = (PlaceholderExpansion) value;
if (!ex.persist()) {
Bukkit.getPluginManager().callEvent(new PlaceholderHookUnloadEvent(key, value));
Bukkit.getPluginManager().callEvent(new ExpansionUnregisterEvent(ex));
unregisterPlaceholderHook(key);
}
}