9
0
mirror of https://github.com/Xiao-MoMi/Custom-Crops.git synced 2025-12-29 03:49:08 +00:00
This commit is contained in:
Xiao-MoMi
2023-05-13 01:53:38 +08:00
parent 79045745cd
commit f9d6274732
9 changed files with 280 additions and 9 deletions

View File

@@ -39,6 +39,8 @@ import net.momirealms.customcrops.integration.skill.MMOCoreImpl;
import net.momirealms.customcrops.integration.skill.mcMMOImpl;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.event.HandlerList;
import org.bukkit.event.Listener;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.PluginManager;
import org.jetbrains.annotations.NotNull;
@@ -113,8 +115,12 @@ public class IntegrationManager extends Function {
}
private void hookJobs() {
if (this.jobInterface instanceof JobsRebornImpl jobsReborn) {
HandlerList.unregisterAll(jobsReborn);
}
if (pluginManager.isPluginEnabled("Jobs")) {
this.jobInterface = new JobsRebornImpl();
Bukkit.getPluginManager().registerEvents((Listener) jobInterface, plugin);
hookMessage("JobsReborn");
} else if (pluginManager.isPluginEnabled("EcoJobs")) {
this.jobInterface = new EcoJobsImpl();