From 9d86ac2070cb383f7adbc78fc938f0dc691c365b Mon Sep 17 00:00:00 2001 From: Brianna Date: Sun, 31 May 2020 09:38:44 -0500 Subject: [PATCH] Lets load this with reflection. --- src/main/java/com/songoda/epicfarming/EpicFarming.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/songoda/epicfarming/EpicFarming.java b/src/main/java/com/songoda/epicfarming/EpicFarming.java index 167c13d..7fe955c 100644 --- a/src/main/java/com/songoda/epicfarming/EpicFarming.java +++ b/src/main/java/com/songoda/epicfarming/EpicFarming.java @@ -15,7 +15,6 @@ import com.songoda.core.utils.TextUtils; import com.songoda.epicfarming.boost.BoostData; import com.songoda.epicfarming.boost.BoostManager; import com.songoda.epicfarming.commands.*; -import com.songoda.epicfarming.compatibility.EpicFarmingPermission; import com.songoda.epicfarming.farming.Farm; import com.songoda.epicfarming.farming.FarmManager; import com.songoda.epicfarming.farming.FarmType; @@ -39,6 +38,7 @@ import com.songoda.epicfarming.tasks.HopperTask; import com.songoda.epicfarming.utils.EntityUtils; import com.songoda.epicfarming.utils.Methods; import com.songoda.skyblock.SkyBlock; +import com.songoda.skyblock.permission.BasicPermission; import org.apache.commons.lang.math.NumberUtils; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -194,7 +194,12 @@ public class EpicFarming extends SongodaPlugin { pluginManager.registerEvents(new UnloadListeners(this), this); if (pluginManager.isPluginEnabled("FabledSkyBlock")) { - SkyBlock.getInstance().getPermissionManager().registerPermission(new EpicFarmingPermission()); + try { + SkyBlock.getInstance().getPermissionManager().registerPermission( + (BasicPermission) Class.forName("com.songoda.epicfarming.compatibility.EpicFarmingPermission").newInstance()); + } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) { + e.printStackTrace(); + } } // Start tasks