Lets load this with reflection.

This commit is contained in:
Brianna 2020-05-31 09:38:44 -05:00
parent 00694f9c4e
commit 9d86ac2070

View File

@ -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