Package ch.njol.skript.bukkitutil
Class PaperEntityUtils
java.lang.Object
ch.njol.skript.bukkitutil.PaperEntityUtils
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidlookAt(io.papermc.paper.entity.LookAnchor entityAnchor, Object target, @Nullable Float headRotationSpeed, @Nullable Float maxHeadPitch, org.bukkit.entity.LivingEntity... entities) Instruct a Mob (1.17+) or Players (1.19.1+) to look at a specific vector/location/entity.static voidlookAt(Object target, @Nullable Float headRotationSpeed, @Nullable Float maxHeadPitch, org.bukkit.entity.LivingEntity... entities) Instruct a Mob (1.17+) to look at a specific vector/location/entity.static voidInstruct a Mob (1.17+) to look at a specific vector/location/entity.
-
Constructor Details
-
PaperEntityUtils
public PaperEntityUtils()
-
-
Method Details
-
lookAt
Instruct a Mob (1.17+) to look at a specific vector/location/entity. Object can be aVector,LocationorEntity- 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, org.bukkit.entity.LivingEntity... entities) Instruct a Mob (1.17+) to look at a specific vector/location/entity. Object can be aVector,LocationorEntity- 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(io.papermc.paper.entity.LookAnchor entityAnchor, Object target, @Nullable @Nullable Float headRotationSpeed, @Nullable @Nullable Float maxHeadPitch, org.bukkit.entity.LivingEntity... entities) Instruct a Mob (1.17+) or Players (1.19.1+) to look at a specific vector/location/entity. Object can be aVector,LocationorEntityTHIS METHOD IS FOR 1.19.1+ ONLY. UselookAt(java.lang.Object,[email protected] Float,[email protected] 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+
-