use of org.bukkit.craftbukkit.v1_12_R1.entity.CraftCreature in project Ublisk by Derkades.
the class V1_12_R1 method setTargetToClosestPlayer.
@Override
public void setTargetToClosestPlayer(Creature creature, Player player) {
CraftLivingEntity craftLiving = (CraftLivingEntity) player;
EntityLiving entityLiving = craftLiving.getHandle();
((CraftCreature) creature).getHandle().setGoalTarget(entityLiving, TargetReason.CLOSEST_PLAYER, false);
}
use of org.bukkit.craftbukkit.v1_12_R1.entity.CraftCreature in project Ublisk by Derkades.
the class V1_12_R1 method setTarget.
@Override
public void setTarget(Creature creature, LivingEntity target) {
CraftCreature craftCreature = (CraftCreature) creature;
EntityCreature nms = craftCreature.getHandle();
if (target == null) {
nms.setGoalTarget(null, null, false);
} else {
nms.setGoalTarget(((CraftLivingEntity) target).getHandle(), null, false);
}
}
Aggregations