Drag&Drop books onto Player Heads
Steps to Enable Drag & Drop for PLAYER_HEAD
To allow custom enchantment books to be applied onto PLAYER_HEAD items through a drag-and-drop action, you need to modify the enchantments.yml
file. Here's how to do it:
1. Locate the Enchantment Entry: Find the specific enchantment entry in the
enchantments.yml
file. This file contains all the custom enchantments available on your server.2. Modify the 'Applies' Section: In the enchantment entry, look for the
applies
section. This section determines which items the enchantment can be applied to.3. Add PLAYER_HEAD to the Applies Section: Under the
applies
section, add- PLAYER_HEAD
to allow the enchantment to be applied to PLAYER_HEAD items.Here's an example for the
glowing
enchantment:
glowing:
display: '%group-color%Glowing'
description: Gives permanent night vision.
applies-to: Helmet
type: EFFECT_STATIC
group: SIMPLE
applies:
- ALL_HELMET
- PLAYER_HEAD
levels:
'1':
effects:
- POTION:NIGHT_VISION:0
4. Save Changes and Reload: After making the changes, save the
enchantments.yml
file. Then, reload the plugin configurations on your server to apply the changes.
Last updated
Was this helpful?