NpcInteraction
Namespace Mc.Scripting · Kind struct (readonly)
public readonly struct NpcInteractionA click on an NPC ({{cref:M:Mc.Scripting.Npcs.OnInteract(System.Action{Mc.Scripting.NpcInteraction})}}).
Properties
Section titled “Properties”| Member | Description |
|---|---|
NpcClick Action { get; } |
A left click (an attack) or a right click (an interaction). |
Hand Hand { get; } |
The hand of the click (a left click is the main hand). |
ulong Handle { get; } |
The handle of the NPC (the engine’s; NpcInteraction.Npc of it is NpcInteraction.Npc.Handle). |
Npc? Npc { get; } |
The NPC, if it still exists. |
Player Player { get; } |
The player who clicked. |
bool Sneaking { get; } |
Whether the player was sneaking. |
Action
Section titled “Action”public NpcClick Action { get; }A left click (an attack) or a right click (an interaction).
public Hand Hand { get; }The hand of the click (a left click is the main hand).
Handle
Section titled “Handle”public ulong Handle { get; }The handle of the NPC (the engine’s; NpcInteraction.Npc of it is NpcInteraction.Npc.Handle).
public Npc? Npc { get; }The NPC, if it still exists.
Player
Section titled “Player”public Player Player { get; }The player who clicked.
Sneaking
Section titled “Sneaking”public bool Sneaking { get; }Whether the player was sneaking.