From bf4368c9beb1da67ca9ab481a3aab367ad19d917 Mon Sep 17 00:00:00 2001 From: ceze88 Date: Sat, 6 Apr 2024 13:04:36 +0200 Subject: [PATCH] Fix plugin live reloading --- src/main/java/com/craftaro/epicfarming/EpicFarming.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/craftaro/epicfarming/EpicFarming.java b/src/main/java/com/craftaro/epicfarming/EpicFarming.java index f99f645..af51bc4 100644 --- a/src/main/java/com/craftaro/epicfarming/EpicFarming.java +++ b/src/main/java/com/craftaro/epicfarming/EpicFarming.java @@ -74,6 +74,7 @@ public class EpicFarming extends SongodaPlugin { private FarmTask farmTask; private EntityUtils entityUtils; + private static EpicFarming instance; @Override public void onPluginLoad() { @@ -94,6 +95,7 @@ public class EpicFarming extends SongodaPlugin { @Override public void onPluginEnable() { + instance = this; // Run Songoda Updater SongodaCore.registerPlugin(this, 21, XMaterial.WHEAT); @@ -390,11 +392,7 @@ public class EpicFarming extends SongodaPlugin { return this.entityUtils; } - /** - * @deprecated Use {@link EpicFarming#getPlugin(Class)} instead. - */ - @Deprecated public static EpicFarming getInstance() { - return getPlugin(EpicFarming.class); + return instance; } }