Class PaperEntityUtils

java.lang.Object
ch.njol.skript.bukkitutil.PaperEntityUtils

public class PaperEntityUtils extends Object
  • Constructor Details

    • PaperEntityUtils

      public PaperEntityUtils()
  • Method Details

    • lookAt

      public static void lookAt(Object target, LivingEntity... entities)
      Instruct a Mob (1.17+) to look at a specific vector/location/entity. Object can be a Vector, Location or Entity
      Parameters:
      target - The vector/location/entity to make the livingentity look at.
      entities - The living entities to make look at something.
    • lookAt

      public static void lookAt(Object target, @Nullable @Nullable Float headRotationSpeed, @Nullable @Nullable Float maxHeadPitch, LivingEntity... entities)
      Instruct a Mob (1.17+) to look at a specific vector/location/entity. Object can be a Vector, Location or Entity
      Parameters:
      target - The vector/location/entity to make the livingentity look at.
      headRotationSpeed - The rotation speed at which the living entities will rotate their head to the target. Vanilla default values range from 10-50. Doesn't apply to players.
      maxHeadPitch - The maximum pitch at which the eyes/feet can go to. Doesn't apply to players.
      entities - The living entities to make look at something.
    • lookAt

      public static void lookAt(LookAnchor entityAnchor, Object target, @Nullable @Nullable Float headRotationSpeed, @Nullable @Nullable Float maxHeadPitch, LivingEntity... entities)
      Instruct a Mob (1.17+) or Players (1.19.1+) to look at a specific vector/location/entity. Object can be a Vector, Location or Entity THIS METHOD IS FOR 1.19.1+ ONLY. Use lookAt(java.lang.Object,java.lang.@org.jetbrains.annotations.Nullable Float,java.lang.@org.jetbrains.annotations.Nullable Float,org.bukkit.entity.LivingEntity...) otherwise.
      Parameters:
      entityAnchor - What part of the entity the player should face assuming the LivingEntity argument contains a player. Only for players.
      target - The vector/location/entity to make the livingentity or player look at.
      headRotationSpeed - The rotation speed at which the living entities will rotate their head to the target. Vanilla default values range from 10-50. Doesn't apply to players.
      maxHeadPitch - The maximum pitch at which the eyes/feet can go to. Doesn't apply to players.
      entities - The living entities to make look at something. Players can be involved in 1.19.1+