registerPlayerInteract

open fun registerPlayerInteract(method: Any): EventTrigger

Registers a new trigger that runs before the player interacts.

In 1.8.9, the following events will activate this trigger:

  • Right clicking a block

  • Right clicking the air

In 1.12.2, the following events will activate this trigger:

  • Left clicking a block

  • Left clicking air

  • Right clicking an entity

  • Right clicking a block

  • Right clicking an item

  • Right clicking air

Passes through three arguments:

Available modifications:

Return

The trigger for additional modification

Parameters

method

The method to call when the event is fired

Sources

Link copied to clipboard