| Name | player prepares item enchant |
| Event Lines | player prepares item enchant
player prepares <item> enchant |
| Triggers | when a player prepares to enchant an item. |
| Generated Examples | after player prepares item enchant:
after player prepares light_gray_terracotta enchant: on player prepares item enchant: after player prepares spruce_hanging_sign enchant: |
| Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Contexts | <context.location> returns the LocationTag of the enchanting block.
<context.item> returns the ItemTag to be enchanted.
<context.bonus> returns an ElementTag(Number) of the enchanting bonus available (number of bookshelves).
<context.offers> returns a ListTag of the available enchanting offers, each as a MapTag with keys 'cost', 'enchantment_type', and 'level'.
|
| Determine | "OFFERS:<ListTag>" of MapTags to set the offers available. Cannot be a different size list than the size of context.offers. |
| Group | Player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerPreparesEnchantScriptEvent.java#L20 |