mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2024-12-23 04:47:34 +01:00
fixed denizen hook
This commit is contained in:
parent
f5474ef520
commit
7b4e735547
@ -1,6 +1,5 @@
|
||||
package net.Indyuce.mmoitems;
|
||||
|
||||
import com.denizenscript.depenizen.bukkit.Depenizen;
|
||||
import io.lumine.mythic.lib.api.item.NBTItem;
|
||||
import io.lumine.mythic.lib.api.util.ui.FriendlyFeedbackCategory;
|
||||
import io.lumine.mythic.lib.api.util.ui.FriendlyFeedbackMessage;
|
||||
@ -17,7 +16,7 @@ import net.Indyuce.mmoitems.api.util.NumericStatFormula;
|
||||
import net.Indyuce.mmoitems.api.util.message.FFPMMOItems;
|
||||
import net.Indyuce.mmoitems.command.MMOItemsCommandTreeRoot;
|
||||
import net.Indyuce.mmoitems.comp.*;
|
||||
import net.Indyuce.mmoitems.comp.denizen.DenizenBridge;
|
||||
import net.Indyuce.mmoitems.comp.denizen.DenizenHook;
|
||||
import net.Indyuce.mmoitems.comp.eco.VaultSupport;
|
||||
import net.Indyuce.mmoitems.comp.enchants.AdvancedEnchantmentsHook;
|
||||
import net.Indyuce.mmoitems.comp.enchants.CrazyEnchantsStat;
|
||||
@ -143,8 +142,7 @@ public class MMOItems extends LuminePlugin {
|
||||
enchantPlugins.add(new MythicEnchantsSupport());
|
||||
|
||||
if (Bukkit.getPluginManager().getPlugin("Depenizen") != null) {
|
||||
Depenizen depenizen = (Depenizen) Bukkit.getPluginManager().getPlugin("Depenizen");
|
||||
depenizen.registerBridge(getName(), () -> new DenizenBridge());
|
||||
new DenizenHook();
|
||||
getLogger().log(Level.INFO, "Hooked onto Denizen");
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,18 @@
|
||||
package net.Indyuce.mmoitems.comp.denizen;
|
||||
|
||||
import com.denizenscript.depenizen.bukkit.Depenizen;
|
||||
import net.Indyuce.mmoitems.MMOItems;
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
public class DenizenHook {
|
||||
|
||||
/**
|
||||
* Putting this here so that the Depenizen import does not
|
||||
* appear in the main MMOItems class which would cause an issue
|
||||
* for all servers without Denizen
|
||||
*/
|
||||
public DenizenHook() {
|
||||
Depenizen depenizen = (Depenizen) Bukkit.getPluginManager().getPlugin("Depenizen");
|
||||
depenizen.registerBridge(MMOItems.plugin.getName(), () -> new DenizenBridge());
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user