TheBrokenRail
0f63f63d86
Some checks failed
ScriptCraft/pipeline/head There was a failure building this commit
741 B
741 B
Use An Event
Example
import { Events } from 'minecraft';
Events.WORLD_TICK.addListener(e => {
// Use e.getWorld()
});
All Events
Name | Description | Input Type | Output Type |
---|---|---|---|
WORLD_TICK |
Triggered on every world tick. | WorldEvent |
None |
ATTACK_BLOCK |
Triggered when breaking a block. | BlockEvent |
ActionResult |
USE_BLOCK |
Triggered when using a block. | BlockEvent |
ActionResult |
USE_ITEM |
Triggered when using an item. | ItemEvent |
ActionResult |
Manually Trigger An Event
import { Events } from 'minecraft';
const result = Events.<Event Name>.trigger(<Input Value>);