mirror of
https://github.com/songoda/EpicFurnaces.git
synced 2025-01-08 08:47:51 +01:00
Hotfix for plugin not loading without fsb
This commit is contained in:
parent
cfa150bdef
commit
c0f0d8ed8e
@ -12,6 +12,7 @@ import com.songoda.epicfurnaces.boost.BoostData;
|
||||
import com.songoda.epicfurnaces.boost.BoostManager;
|
||||
import com.songoda.epicfurnaces.commands.*;
|
||||
import com.songoda.epicfurnaces.compatibility.EpicFurnacesPermission;
|
||||
import com.songoda.epicfurnaces.compatibility.FabledSkyBlockLoader;
|
||||
import com.songoda.epicfurnaces.furnace.Furnace;
|
||||
import com.songoda.epicfurnaces.furnace.FurnaceBuilder;
|
||||
import com.songoda.epicfurnaces.furnace.FurnaceManager;
|
||||
@ -99,13 +100,7 @@ public class EpicFurnaces extends SongodaPlugin {
|
||||
|
||||
// Hook into FabledSkyBlock
|
||||
if (Bukkit.getPluginManager().isPluginEnabled("FabledSkyBlock")) {
|
||||
SkyBlock.getInstance().getPermissionManager().registerPermission(new EpicFurnacesPermission());
|
||||
try {
|
||||
SkyBlock.getInstance().getPermissionManager().registerPermission(
|
||||
(BasicPermission) Class.forName("com.songoda.epicfurnaces.compatibility.EpicFurnacesPermission").getDeclaredConstructor().newInstance());
|
||||
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
new FabledSkyBlockLoader();
|
||||
}
|
||||
|
||||
|
||||
|
@ -0,0 +1,19 @@
|
||||
package com.songoda.epicfurnaces.compatibility;
|
||||
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.permission.BasicPermission;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
public class FabledSkyBlockLoader {
|
||||
|
||||
public FabledSkyBlockLoader() {
|
||||
SkyBlock.getInstance().getPermissionManager().registerPermission(new EpicFurnacesPermission());
|
||||
try {
|
||||
SkyBlock.getInstance().getPermissionManager().registerPermission(
|
||||
(BasicPermission) Class.forName("com.songoda.epicfurnaces.compatibility.EpicFurnacesPermission").getDeclaredConstructor().newInstance());
|
||||
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user