Deprecated method use

This commit is contained in:
Indyuce 2022-11-10 17:28:43 +01:00
parent 7317954d70
commit a0f0a38b34
2 changed files with 5 additions and 5 deletions

View File

@ -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<SimpleSkillResult> 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<SimpleSkillResult> 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 {

View File

@ -37,7 +37,7 @@ public class Sneaky_Picky extends SkillHandler<SimpleSkillResult> 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<SimpleSkillResult> 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()));
}
}