From d20538aab3e594b3544191c0bdf2fcf589d01379 Mon Sep 17 00:00:00 2001 From: Silent Date: Fri, 18 Feb 2022 02:02:44 +0100 Subject: [PATCH] call event --- src/main/java/tsp/headdb/database/HeadDatabase.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/tsp/headdb/database/HeadDatabase.java b/src/main/java/tsp/headdb/database/HeadDatabase.java index e6a2c15..03b388f 100644 --- a/src/main/java/tsp/headdb/database/HeadDatabase.java +++ b/src/main/java/tsp/headdb/database/HeadDatabase.java @@ -8,6 +8,7 @@ import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; import org.json.simple.parser.ParseException; import tsp.headdb.api.Head; +import tsp.headdb.event.DatabaseUpdateEvent; import tsp.headdb.util.Log; import tsp.headdb.util.Utils; @@ -217,6 +218,7 @@ public class HeadDatabase { HEADS.clear(); HEADS.putAll(heads); result.accept(heads); + Bukkit.getPluginManager().callEvent(new DatabaseUpdateEvent(this, heads)); })); }