setRightClickCallback

public void setRightClickCallback(BiConsumer<Player, PacketEntityInterface> callback)

Sets a callback to be invoked when a player right-clicks (interacts with) this packet entity. The callback receives the player who clicked and this packet entity.

Parameters

callback

The callback to invoke on right-click, or null to remove