diff --git a/MMOCore-API/src/main/java/net/Indyuce/mmocore/skill/list/Ambers.java b/MMOCore-API/src/main/java/net/Indyuce/mmocore/skill/list/Ambers.java index 25a16be3..00298044 100644 --- a/MMOCore-API/src/main/java/net/Indyuce/mmocore/skill/list/Ambers.java +++ b/MMOCore-API/src/main/java/net/Indyuce/mmocore/skill/list/Ambers.java @@ -11,8 +11,8 @@ import io.lumine.mythic.lib.skill.result.def.SimpleSkillResult; import io.lumine.mythic.lib.skill.trigger.TriggerMetadata; import io.lumine.mythic.lib.util.EntityLocationType; import io.lumine.mythic.lib.util.ParabolicProjectile; -import net.Indyuce.mmocore.api.player.PlayerData; import net.Indyuce.mmocore.api.event.PlayerResourceUpdateEvent; +import net.Indyuce.mmocore.api.player.PlayerData; import org.bukkit.Color; import org.bukkit.Location; import org.bukkit.Particle; @@ -45,7 +45,7 @@ public class Ambers extends SkillHandler implements Listener @EventHandler public void spawnAmber(PlayerAttackEvent event) { - MMOPlayerData data = event.getData(); + MMOPlayerData data = event.getAttacker().getData(); if (!event.getAttack().getDamage().hasType(DamageType.SKILL)) return; @@ -53,7 +53,7 @@ public class Ambers extends SkillHandler implements Listener if (passive == null) return; - passive.getTriggeredSkill().cast(new TriggerMetadata(event.getAttack(), event.getEntity())); + passive.getTriggeredSkill().cast(new TriggerMetadata(event.getAttacker(), event.getAttack(), event.getEntity())); } public static class Amber extends BukkitRunnable { diff --git a/MMOCore-API/src/main/java/net/Indyuce/mmocore/skill/list/Sneaky_Picky.java b/MMOCore-API/src/main/java/net/Indyuce/mmocore/skill/list/Sneaky_Picky.java index eeb3b1e3..22cd0762 100644 --- a/MMOCore-API/src/main/java/net/Indyuce/mmocore/skill/list/Sneaky_Picky.java +++ b/MMOCore-API/src/main/java/net/Indyuce/mmocore/skill/list/Sneaky_Picky.java @@ -37,7 +37,7 @@ public class Sneaky_Picky extends SkillHandler implements Lis @EventHandler public void a(PlayerAttackEvent event) { - MMOPlayerData data = event.getData(); + MMOPlayerData data = event.getAttacker().getData(); if (!event.getAttack().getDamage().hasType(DamageType.WEAPON) || PlayerData.get(data.getUniqueId()).isInCombat()) return; @@ -45,6 +45,6 @@ public class Sneaky_Picky extends SkillHandler implements Lis if (skill == null) return; - skill.getTriggeredSkill().cast(new TriggerMetadata(event.getAttack(), event.getEntity())); + skill.getTriggeredSkill().cast(new TriggerMetadata(event.getAttacker(), event.getAttack(), event.getEntity())); } }