BlockToolModificationEvent
The event is not cancelable.
The event does not have a result.
Importing the class
Importing the class is recommended for events, simply add this line to the top of your script file.
Supertype
BlockToolModificationEvent extends BlockEvent. That means all methods available in BlockEvent are also available in BlockToolModificationEvent
Listening to the event
Properties
Name | Type | Has Getter | Has Setter | Description |
---|---|---|---|---|
Name context | Type UseOnContext | Has Getter true | Has Setter false | Description |
Name finalState | Type BlockToolModificationEvent | Has Getter true | Has Setter true | Description Sets the transformed state after tool use. If not set, will return the original state. This will be bypassed if canceled, returning null instead. |
Name heldItemStack | Type IItemStack | Has Getter true | Has Setter false | Description |
Name isSimulated | Type boolean | Has Getter true | Has Setter false | Description |
Name player | Type Player | Has Getter true | Has Setter false | Description |
Name toolAction | Type ToolAction | Has Getter true | Has Setter false | Description |