!Removed unused stuff

This commit is contained in:
Indyuce 2020-04-02 12:25:26 +02:00
parent 4f64526e79
commit 8e9744f02b
3 changed files with 11 additions and 12 deletions

View File

@ -5,8 +5,8 @@ import java.util.Iterator;
import java.util.Map; import java.util.Map;
import net.Indyuce.mmocore.api.skill.Skill; import net.Indyuce.mmocore.api.skill.Skill;
import net.Indyuce.mmocore.api.skill.SkillResult;
import net.Indyuce.mmocore.api.skill.Skill.SkillInfo; import net.Indyuce.mmocore.api.skill.Skill.SkillInfo;
import net.Indyuce.mmocore.api.skill.SkillResult;
import net.Indyuce.mmocore.comp.mythicmobs.MythicMobSkill; import net.Indyuce.mmocore.comp.mythicmobs.MythicMobSkill;
public class PlayerSkillData { public class PlayerSkillData {
@ -22,7 +22,7 @@ public class PlayerSkillData {
*/ */
private final Map<String, CachedModifier> cache = new HashMap<>(); private final Map<String, CachedModifier> cache = new HashMap<>();
public int ambers; // public int ambers;
public PlayerSkillData(PlayerData data) { public PlayerSkillData(PlayerData data) {
this.data = data; this.data = data;
@ -53,9 +53,9 @@ public class PlayerSkillData {
cooldowns.put(skill.getSkill().getId(), lastCast(skill.getSkill()) + (long) (relative ? value * getCooldown(skill) : value * 1000)); cooldowns.put(skill.getSkill().getId(), lastCast(skill.getSkill()) + (long) (relative ? value * getCooldown(skill) : value * 1000));
} }
public void resetData() { // public void resetData() {
ambers = 0; // ambers = 0;
} // }
public int getCachedModifier(String name) { public int getCachedModifier(String name) {
return cache.containsKey(name) ? cache.get(name).getValue() : 0; return cache.containsKey(name) ? cache.get(name).getValue() : 0;

View File

@ -16,7 +16,6 @@ import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.event.player.PlayerQuitEvent;
import net.Indyuce.mmocore.MMOCore; import net.Indyuce.mmocore.MMOCore;
import net.Indyuce.mmocore.api.event.PlayerCombatEvent;
import net.Indyuce.mmocore.api.event.PlayerRegenResourceEvent; import net.Indyuce.mmocore.api.event.PlayerRegenResourceEvent;
import net.Indyuce.mmocore.api.player.PlayerData; import net.Indyuce.mmocore.api.player.PlayerData;
import net.Indyuce.mmocore.api.player.profess.resource.PlayerResource; import net.Indyuce.mmocore.api.player.profess.resource.PlayerResource;
@ -77,11 +76,11 @@ public class PlayerListener implements Listener {
/* /*
* reset skill data when leaving combat * reset skill data when leaving combat
*/ */
@EventHandler // @EventHandler
public void f(PlayerCombatEvent event) { // public void f(PlayerCombatEvent event) {
if (!event.entersCombat()) // if (!event.entersCombat())
event.getData().getSkillData().resetData(); // event.getData().getSkillData().resetData();
} // }
/* /*
* Warning: this really is not the best way to interface with MMOCore * Warning: this really is not the best way to interface with MMOCore

View File

@ -72,7 +72,7 @@ public class Ambers extends Skill implements Listener {
if (data.getPlayer().getLocation().distanceSquared(loc) < 2) { if (data.getPlayer().getLocation().distanceSquared(loc) < 2) {
data.getPlayer().playSound(data.getPlayer().getLocation(), Sound.BLOCK_END_PORTAL_FRAME_FILL, 1, 1); data.getPlayer().playSound(data.getPlayer().getLocation(), Sound.BLOCK_END_PORTAL_FRAME_FILL, 1, 1);
data.getSkillData().ambers++; // data.getSkillData().ambers++;
data.giveMana((data.getStats().getStat(StatType.MAX_MANA) - data.getMana()) * .15); data.giveMana((data.getStats().getStat(StatType.MAX_MANA) - data.getMana()) * .15);
cancel(); cancel();