forked from Upstream/mmocore
Fixed a loading issue with latest MythicMobs
This commit is contained in:
parent
d9f0444df0
commit
03573a343a
@ -8,6 +8,9 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandMap;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.server.PluginEnableEvent;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
@ -172,6 +175,16 @@ public class MMOCore extends JavaPlugin {
|
||||
}
|
||||
});
|
||||
|
||||
Bukkit.getPluginManager().registerEvents(new Listener() {
|
||||
@EventHandler
|
||||
public void pluginLoad(PluginEnableEvent event) {
|
||||
if (event.getPlugin().getName().equals("MythicMobs")) {
|
||||
Bukkit.getServer().getPluginManager().registerEvents(new MythicMobsDrops(), plugin);
|
||||
getLogger().log(Level.INFO, "Hooked onto MythicMobs");
|
||||
}
|
||||
}
|
||||
}, plugin);
|
||||
|
||||
if (Bukkit.getPluginManager().getPlugin("Vault") != null)
|
||||
economy = new VaultEconomy();
|
||||
|
||||
@ -212,11 +225,6 @@ public class MMOCore extends JavaPlugin {
|
||||
getLogger().log(Level.INFO, "Hooked onto MyPet");
|
||||
}
|
||||
|
||||
if (Bukkit.getPluginManager().getPlugin("MythicMobs") != null) {
|
||||
Bukkit.getServer().getPluginManager().registerEvents(new MythicMobsDrops(), this);
|
||||
getLogger().log(Level.INFO, "Hooked onto MythicMobs");
|
||||
}
|
||||
|
||||
/*
|
||||
* resource regeneration. must check if entity is dead otherwise regen
|
||||
* will make the 'respawn' button glitched plus HURT entity effect bug
|
||||
|
Loading…
Reference in New Issue
Block a user