For the Materials list:
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html
For the Enchantments list:
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/enchantments/Enchantment.html
For the ItemFlags list:
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/inventory/ItemFlag.html
For the Sounds list:
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Sound.html
For the Particles list:
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Particle.html
For the PotionEffects list:
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/potion/PotionEffectType.html
To create a magical item you have to choose a "code name" for it! such like "heal_rune".
it will be used as reference for the rune configuration its item.
(this means that if you change the item appaerance, the old item still works. to block this just rename the rune code name)
Every rune does have all these fields:
- displayname: this is not the item displayname, is the reference name of the rune
- item: a section that contains all the appaerance data of the rune item
- commands: the list of commands or actions that the item will execute
The commands lists can contain these special actions:
(every command/action does have the placeholders: %player_name% %player_displayname% %player_uuid% %world% %x% %y% %z%, and you can also use PlaceholderAPI's placeholders)
- "tell:TEXT" to directly send a message to te player (you can color the message with the "&" character).
Example: "tell:&eHello!"
- "broadcast:TEXT" to broadcast a message (you can color the message with the "&" character).
Example: "broadcast:&eHello!"
- "title:TITLE TEXT,SUBTITLE TEXT,FADE IN,DURATION,FADE OUT" to broadcast a message (you can color the message with the "&" character).
Example: "title: ,&d...Something just happened...,5,25,5"
- "actionbar:TEXT" to send an actionbar message to the player (you can color the message with the "&" character).
Example: "actionbar:&eHello!"
- "sudo:COMMAND" send a command as the player.
Example: "sudo:spawn"
- "permitted_sudo:COMMAND" send a command as the player with permissions skip.
Example: "permitted_sudo:gamemode creative"
- "sound:SOUND_NAME,VOLUME,PITCH" play a custom sound to the player.
Example: "sound:ENTITY_PLAYER_LEVELUP,1,3"
- "particle,PARTICLE_NAME,LOCATION_WORLD,LOCATION_X,LOCATION_Y,LOCATION_Z,AMOUNT,OFFSET_X,OFFSET_Y,OFFSET_Z,SPEED"
spawn a particle in a location with custom data.
Example: "particle:SNEEZE,%world%,%x%,%y%,%z%,1000,1,1,1,0"
- "effect:EFFECT_NAME,DURATION IN TICKS,AMPLIFIER,AMBIENT,SHOW POTION PARTICLES,SHOW ICON" add an effect to the player.
Example: "effect:REGENERATION,250,2,false,false,true"
- "teleport:WORLD,X,Y,Z" Teleport the player to a location (you can use Double numerical values and pitch/yaw also):
Example: "TELEPORT:world,0,80,80,90,90"
- "fireball_cannon"
- "snowball_cannon"
- "egg_cannon"
- "lightning" (the target block is limited to the farthest in a distance of 50 blocks)
- "openinventory" force the player to open his inventory
- "closeinventory" force the player to close the inventory
- "kill" kill the player
if the command is not one of these, the plugin will sudo the command at the console
- type: the interaction type of the item
- CONSUMABLE: at every click (left or right) it will run all the commands and the item amount will descend by 1 or destroy.
- INFINITE: like CONSUMABLE but infinite
- HELD_EFFECT: everytime the delay resets, the commands will be run if the player is holding the item.
- KEEP_EFFECT: everytime the delay resets, the commands will be run if the player is kepping the item in its inventory.
- delay: delay in ticks of the commands execution (20 ticks = 1 second)
- recipe: custom recipe of the item
TO DISABLE THE CUSTOM RECIPE JUST REMOVE THE "recipe" FIELD
To configure a shaped recipe, set three fields: "row1","row2","row3" with three material names separated by a ","
at example:
Code (Text):
recipe:
row1: "AIR,GOLD_INGOT,AIR"
row2: "GOLD_INGOT,NETHER_STAR,GOLD_INGOT"
row3: "AIR,GOLD_INGOT,AIR"
YOU WILL GET A CONSOLE ERROR IF THERE AREN'T THREE MATERIALS PER ROW OR IF ONE OF THESE MATERIALS DOES NOT EXIST.
To configure a shapeless recipe, set a list field: "shapeless".
NOTE THAT: if you set a shapeless field, the plugin will ignore the rows system.
Example:
Code (Text):
recipe:
shapeless:
- GOLD_INGOT
- NETHER_STAR
this means that the ingredients position the player will use in the crafting table is not relevant, just put at least one of these per slot
- do_not_cancel: if set to true, all the interaction events triggered by clicking on a rune item will not be canceled (useful to allow a player to place a block rune or to wear a magical armor with the right click)
Every rune item configuration can have all these fields:
- displayname: the name of the item (you can color the text by using the "&" character)
- material: the item material type
- durability: if it's a weapon or armor, the damage to apply to it
- lore: a list field that is the description/lore of the item (you can color the text by using the "&" character)
- enchantments: a list field for the item enchantments, at example:
Code (Text):
enchantments:
- LUCK,1
- DAMAGE_ALL,2 #(DAMAGE_ALL is Sharpness)
- flags: a list field for the item flags, for example:
Code (Text):
flags:
- HIDE_ENCHANTS
- HIDE_ATTRIBUTES
- unbreakable: set to true if you want the item to be unbreakable.
- model_data: set a model data id to use with a custom ResourcesPack.