Add action and handler for gliding, equip, refactored PolicyParser and implementations to support world matching
Some checks are pending
Build / build (push) Waiting to run
Some checks are pending
Build / build (push) Waiting to run
This commit is contained in:
parent
96005d8c86
commit
f4a362c1c7
35 changed files with 651 additions and 177 deletions
34
docs/Nodes.md
Normal file
34
docs/Nodes.md
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
# Nodes
|
||||
Nodes narrow down even further if an action can be done or not. A node needs _properties_ to know what it should check against, for example, a HIT node needs a _list_ of blocks that it will check if the player is holding; while a USE_ENCHANTMENT node needs a mapping of enchantment to level. Some nodes like glyde don't need a value and will ignore if you provide one.
|
||||
```yaml
|
||||
nodes:
|
||||
- [HIT]:
|
||||
values:
|
||||
- 'GOLD_SWORD'
|
||||
- [USE_ENCHANTMENT]:
|
||||
values:
|
||||
- "UNBREAKING": "1"
|
||||
- [GLYDE]
|
||||
```
|
||||
|
||||
## Available nodes
|
||||
### INTERACT
|
||||
Triggered on `InteractionEvent`, returns true when the provided `list` contains the material used to interact.
|
||||
|
||||
### HIT
|
||||
Triggered on `EntityDamageByEntityEvent`, returns true when the provided `list` contains the material used to hit.
|
||||
|
||||
### PLACE
|
||||
Triggered on `BlockPlaceEvent`, returns true when the provided `list` contains the material being placed.
|
||||
|
||||
### BREAK
|
||||
Triggered on `BlockBreakEvent`, returns true when the provided `list` contains the material used to break.
|
||||
|
||||
### EQUIP
|
||||
Triggered on `InventoryClickEvent` and `PlayerInteractEvent` (only if item is an armor), returns true when the provided `list` contains the material being equipped.
|
||||
|
||||
### GLYDE
|
||||
Triggered on `PlayerMoveEvent`, returns true if player is gliding.
|
||||
|
||||
### USE_ENCHANTMENT
|
||||
Triggered on `BlockBreakEvent` and `onEntityDamageByEntityEvent`, returns true the used item has an enchantment matching the provided mapping of enchantment-level.
|
||||
Loading…
Add table
Add a link
Reference in a new issue