diff --git a/src/main/java/net/Indyuce/mmocore/api/skill/TargetSkillResult.java b/src/main/java/net/Indyuce/mmocore/api/skill/TargetSkillResult.java index 840b234d..d7159efd 100644 --- a/src/main/java/net/Indyuce/mmocore/api/skill/TargetSkillResult.java +++ b/src/main/java/net/Indyuce/mmocore/api/skill/TargetSkillResult.java @@ -1,12 +1,11 @@ package net.Indyuce.mmocore.api.skill; import org.bukkit.entity.LivingEntity; +import org.bukkit.util.RayTraceResult; import net.Indyuce.mmocore.MMOCoreUtils; import net.Indyuce.mmocore.api.player.PlayerData; import net.Indyuce.mmocore.api.skill.Skill.SkillInfo; -import net.mmogroup.mmolib.MMOLib; -import net.mmogroup.mmolib.api.MMORayTraceResult; public class TargetSkillResult extends SkillResult { private LivingEntity target; @@ -15,11 +14,11 @@ public class TargetSkillResult extends SkillResult { super(data, skill); if (isSuccessful()) { - MMORayTraceResult result = MMOLib.plugin.getVersion().getWrapper().rayTrace(data.getPlayer(), data.getPlayer().getEyeLocation().getDirection(), range, entity -> MMOCoreUtils.canTarget(data.getPlayer(), entity)); + RayTraceResult result = data.getPlayer().getWorld().rayTraceEntities(data.getPlayer().getEyeLocation(), data.getPlayer().getEyeLocation().getDirection(), range, entity -> MMOCoreUtils.canTarget(data.getPlayer(), entity)); if (result == null) abort(CancelReason.OTHER); else - target = (LivingEntity) result.getHit(); + target = (LivingEntity) result.getHitEntity(); } }