API reference Obsidian.API.Events
EntityInteractEventArgs class
public class EntityInteractEventArgs : EntityEventArgs
In Obsidian.API.
Constructors
public EntityInteractEventArgs(IPlayer player, IEntity entity, IServer server, bool sneaking = false);public EntityInteractEventArgs(IPlayer player, IEntity entity, IServer server, InteractionHand hand, bool sneaking = false);public EntityInteractEventArgs(IPlayer player, IEntity entity, IServer server, InteractionHand hand, VectorF targetPosition, bool sneaking = false);Properties
public InteractionHand? Hand { get; set; }Player
public IPlayer Player { get; }The player who interacted with the entity.
Sneaking
public bool Sneaking { get; }True if the player is sneaking when this event is triggered.
TargetPosition
public VectorF? TargetPosition { get; set; }Where on the entity the player clicked, relative to the entity's position, when a client interacted.