On Player - on Interact (Event) — Lusk

Addon: Lusk · Category: Event · Since: 1.3

Syntax

[on] player [[main|off][ |-]hand [slot]] interact[ing|ion] [(on|with|at) [an] entity|(with|on) [a] block]

Description

Called when a player interacts with a block or entity by clicking.

This event is always called unlike Skript's click event, meaning that it can be called for both hands.

You can use `main hand` and `off hand` to make it per hand.

`event-equipmentslot` = the slot of the used hand `event-blockaction` = the action of this event `event-vector` = the vector from the player to the interaction point `event-location` = the location of the interaction point

Event Values

  • event-block
  • event-blockaction
  • event-blockface
  • event-direction
  • event-entity
  • event-equipmentslot
  • event-itemstack
  • event-location
  • event-player
  • event-vector
  • event-world

Examples

on player main hand interaction:
on player interacting with an entity:
	if event-equipmentslot = hand slot:

View source