forked from Upstream/mmocore
Fixed skill placeholders. Added <mmocore.stamina>
This commit is contained in:
parent
e06f70e158
commit
ee92f16003
@ -8,9 +8,6 @@ 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;
|
||||
|
||||
@ -176,15 +173,10 @@ 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);
|
||||
if (Bukkit.getPluginManager().getPlugin("MythicMobs") != null) {
|
||||
Bukkit.getServer().getPluginManager().registerEvents(new MythicMobsDrops(), this);
|
||||
getLogger().log(Level.INFO, "Hooked onto MythicMobs");
|
||||
}
|
||||
}
|
||||
}, plugin);
|
||||
|
||||
if (Bukkit.getPluginManager().getPlugin("Vault") != null)
|
||||
economy = new VaultEconomy();
|
||||
|
@ -47,5 +47,6 @@ public class MythicMobsDrops implements Listener {
|
||||
private void registerPlaceholders() {
|
||||
MythicMobs.inst().getPlaceholderManager().register("mmocore.skill", Placeholder.meta((metadata, arg) -> String.valueOf(PlayerData.get(metadata.getCaster().getEntity().getUniqueId()).getSkillData().getCachedModifier(arg))));
|
||||
MythicMobs.inst().getPlaceholderManager().register("mmocore.mana", Placeholder.meta((metadata, arg) -> String.valueOf((int) PlayerData.get(metadata.getCaster().getEntity().getUniqueId()).getMana())));
|
||||
MythicMobs.inst().getPlaceholderManager().register("mmocore.stamina", Placeholder.meta((metadata, arg) -> String.valueOf((int) PlayerData.get(metadata.getCaster().getEntity().getUniqueId()).getStamina())));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user