diff --git a/pom.xml b/pom.xml
index 4b38e5b..8e5f41e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,7 +7,7 @@
skulls
Skulls
- 2.9.1
+ 2.11.0
jar
@@ -15,7 +15,7 @@
Skulls
${project.groupId}.${project.artifactId}.${project.name}
1.8
- 1.10.0
+ 1.16.0
com.github.kiranhart
UTF-8
@@ -26,15 +26,6 @@
https://jitpack.io
-
-
-
-
-
-
-
-
-
${tweety.path}
diff --git a/src/main/java/ca/tweetzy/skulls/api/event/SkullsReadyEvent.java b/src/main/java/ca/tweetzy/skulls/api/event/SkullsReadyEvent.java
new file mode 100644
index 0000000..7ce6f56
--- /dev/null
+++ b/src/main/java/ca/tweetzy/skulls/api/event/SkullsReadyEvent.java
@@ -0,0 +1,28 @@
+package ca.tweetzy.skulls.api.event;
+
+import org.bukkit.event.Event;
+import org.bukkit.event.HandlerList;
+
+/**
+ * Date Created: March 22 2022
+ * Time Created: 1:05 p.m.
+ *
+ * @author Kiran Hart
+ */
+public final class SkullsReadyEvent extends Event {
+
+ private static final HandlerList HANDLERS = new HandlerList();
+
+ public SkullsReadyEvent() {
+ super(true);
+ }
+
+ public static HandlerList getHandlerList() {
+ return HANDLERS;
+ }
+
+ @Override
+ public HandlerList getHandlers() {
+ return HANDLERS;
+ }
+}
diff --git a/src/main/java/ca/tweetzy/skulls/model/SkullManager.java b/src/main/java/ca/tweetzy/skulls/model/SkullManager.java
index 884da92..bde6c87 100644
--- a/src/main/java/ca/tweetzy/skulls/model/SkullManager.java
+++ b/src/main/java/ca/tweetzy/skulls/model/SkullManager.java
@@ -2,6 +2,7 @@
import ca.tweetzy.skulls.Skulls;
import ca.tweetzy.skulls.api.enums.SkullsDefaultCategory;
+import ca.tweetzy.skulls.api.event.SkullsReadyEvent;
import ca.tweetzy.skulls.impl.Skull;
import ca.tweetzy.skulls.impl.SkullCategory;
import ca.tweetzy.tweety.Common;
@@ -180,7 +181,7 @@ public void downloadHeadCategory(@NonNull final SkullsDefaultCategory category)
* For internal use only
*/
public void downloadHeads(final boolean redownload) {
- if (redownload || FileUtil.getFile("config.yml").exists()) {
+ if (redownload) {
final File directory = FileUtil.getFile("/heads");
if (directory.exists()) {
for (File file : FileUtil.getFiles("heads", "json")) {
@@ -229,6 +230,8 @@ private void loadHeads() {
}
this.loading = false;
+ Common.callEvent(new SkullsReadyEvent());
+
// load blocked heads
try {
final ConfigurationSection section = Skulls.getInstance().getDataFile().getConfigField("Blocked");