From bec4782b40734b3bbe943438bcacf0864b07631e Mon Sep 17 00:00:00 2001 From: extendedclip Date: Sat, 24 Mar 2018 12:42:45 -0400 Subject: [PATCH] Call ExpansionUnregisterEvent when an expansion is unregistered --- src/main/java/me/clip/placeholderapi/PlaceholderAPI.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/clip/placeholderapi/PlaceholderAPI.java b/src/main/java/me/clip/placeholderapi/PlaceholderAPI.java index 728e6a9..2e081d5 100644 --- a/src/main/java/me/clip/placeholderapi/PlaceholderAPI.java +++ b/src/main/java/me/clip/placeholderapi/PlaceholderAPI.java @@ -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); } }