mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-11-30 01:13:38 +01:00
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.ChatColor;
|
||||||
import org.bukkit.command.CommandMap;
|
import org.bukkit.command.CommandMap;
|
||||||
import org.bukkit.configuration.file.FileConfiguration;
|
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.plugin.java.JavaPlugin;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
@ -176,15 +173,10 @@ public class MMOCore extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Bukkit.getPluginManager().registerEvents(new Listener() {
|
if (Bukkit.getPluginManager().getPlugin("MythicMobs") != null) {
|
||||||
@EventHandler
|
Bukkit.getServer().getPluginManager().registerEvents(new MythicMobsDrops(), this);
|
||||||
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");
|
getLogger().log(Level.INFO, "Hooked onto MythicMobs");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}, plugin);
|
|
||||||
|
|
||||||
if (Bukkit.getPluginManager().getPlugin("Vault") != null)
|
if (Bukkit.getPluginManager().getPlugin("Vault") != null)
|
||||||
economy = new VaultEconomy();
|
economy = new VaultEconomy();
|
||||||
|
@ -47,5 +47,6 @@ public class MythicMobsDrops implements Listener {
|
|||||||
private void registerPlaceholders() {
|
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.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.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