ClickEvent constructor

ClickEvent({
  1. String name = 'objd_click',
  2. Widget? onClick,
  3. Item? selectedItem,
  4. String path = 'events/',
})

The ClickEvent Module uses the trigger of a carrot on a stick to register right clicks with a scoreboard and execute a onClick Widget.

This module has to be executed every tick to work!

constructor
name used to identify different click Events
onClick Widget that is executed if the COAS is clicked
selectedItem just triggers the click if this Item is selected(optional)
path path to create the click handler function(default = events/)

Implementation

ClickEvent({
  this.name = 'objd_click',
  this.onClick,
  this.selectedItem,
  this.path = 'events/',
});