Skip to content

Commit

Permalink
Create has_enchant.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Exanthiax committed May 6, 2024
1 parent 74df5ed commit 0b64344
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions docs/effects/all-conditions/has_enchant.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# `has_enchant`

Requires a player to have certain enchant(s)
# Example Configs
```yaml
- id: has_enchant
args:
enchant: sharpness # The enchant ID
slot: mainhand # The slot
```
Multiple enchants and/or slots are supported:
```yaml
- id: has_enchant
args:
enchants: # All enchants must be present on a single item in the slot(s).
- sharpness # The enchant ID (enchant / enchant:<level> / enchant:<min-max>)
slots: # The enchant must be present in ANY specified slot.
- mainhand
- offhand
```
| Arg | Example | Result |
| ----------------- | --------------- | ---------------------------------------------------------------------- |
| `enchant` | `sharpness` | Any level of the enchantment will satisfy the condition. |
| `enchant:level` | `sharpness:1` | Only the specified enchantment & level will satisfy the condition. |
| `enchant:min-max` | `sharpness:1-3` | Only enchant levels in the specified range will satisfy the condition. |

0 comments on commit 0b64344

Please sign in to comment.