diff --git a/src/main/java/tsp/headdb/core/api/events/AsyncHeadsFetchedEvent.java b/src/main/java/tsp/headdb/core/api/events/AsyncHeadsFetchedEvent.java index 14d7597..df1e13a 100644 --- a/src/main/java/tsp/headdb/core/api/events/AsyncHeadsFetchedEvent.java +++ b/src/main/java/tsp/headdb/core/api/events/AsyncHeadsFetchedEvent.java @@ -3,16 +3,21 @@ package tsp.headdb.core.api.events; import org.bukkit.event.Event; import org.bukkit.event.HandlerList; import org.jetbrains.annotations.NotNull; +import tsp.headdb.implementation.category.Category; +import tsp.headdb.implementation.head.Head; + +import java.util.List; +import java.util.Map; public class AsyncHeadsFetchedEvent extends Event { private static final HandlerList HANDLER_LIST = new HandlerList(); - private final int headsCount; + private final Map> heads; private final String providerName; private final long timeTook; - public AsyncHeadsFetchedEvent(int headsCount, String providerName, long timeTook) { + public AsyncHeadsFetchedEvent(Map> heads, String providerName, long timeTook) { super(true); - this.headsCount = headsCount; + this.heads = heads; this.providerName = providerName; this.timeTook = timeTook; } @@ -30,8 +35,8 @@ public class AsyncHeadsFetchedEvent extends Event { } @SuppressWarnings("unused") - public int getHeadsCount() { - return headsCount; + public Map> getHeads() { + return heads; } @SuppressWarnings("unused") diff --git a/src/main/java/tsp/headdb/core/task/UpdateTask.java b/src/main/java/tsp/headdb/core/task/UpdateTask.java index 29a221a..774f287 100644 --- a/src/main/java/tsp/headdb/core/task/UpdateTask.java +++ b/src/main/java/tsp/headdb/core/task/UpdateTask.java @@ -33,7 +33,7 @@ public class UpdateTask implements Task { HeadDB.getInstance().getLog().debug("Fetched: " + size + " Heads | Provider: " + providerName + " | Time: " + time + "ms (" + TimeUnit.MILLISECONDS.toSeconds(time) + "s)"); Bukkit.getPluginManager().callEvent( new AsyncHeadsFetchedEvent( - size, + heads, providerName, time)); });