namespace Minecraft.Server.FourKit.Event.Player; using Minecraft.Server.FourKit.Entity; /// /// Represents an event that is called when a player right clicks an entity. /// public class PlayerInteractEntityEvent : PlayerEvent, Cancellable { /// The entity that was right-clicked. protected Entity clickedEntity; private bool _cancelled; internal PlayerInteractEntityEvent(Player who, Entity clickedEntity) : base(who) { this.clickedEntity = clickedEntity; } /// public bool isCancelled() => _cancelled; /// public void setCancelled(bool cancel) => _cancelled = cancel; /// /// Gets the entity that was right-clicked by the player. /// /// entity right clicked by player public Entity getRightClicked() => clickedEntity; }