options: ... drop-if-full-inventory: false
# If true and the player has a full inventory, drop the item at their feet. If false and the player has a full inventory, the item is lost. messages: ... receive-item-inventory-full: "&6You have been given %item%&6, but it was dropped at your feet because your inventory is full."
New | (important, please read)CommandToItem now natively uses the 1.14 api, so it will be compatible with 1.14 blocks.
This also means that it cannot be used on versions before 1.14.
Item IDs no longer work as a result of this.
You may see a lot of stone blocks as the names for a lot of items have changed to their vanilla variant. This will require manual fixing. See this listfor the names (ignore LEGACY blocks).
New | (important, please read) Changes to the configuration layout have been made.
Your current config layouts will be compatible for now, however I strongly recommend altering your configuration to the new layout.
All the following options should now be listed under the "on-use" section: consume, cooldown, commands, messages and sound.
This has been done to help prevent the config from becoming the mess as more features are added. The change to the layout properly seperates the tasks which will be done when an item is used from the actual information about the item itself.
items: ... dodgy-apple:
name: "&2&lDodgy Apple &7(Example Item)" item: APPLE
# You can add custom model data custommodeldata: 12345
lore: -
"&7Something seems off about this apple..." on-use:
commands: -
"effect give %player% minecraft:poison 15 1"
New | AttributeModifier support has been added.
You should only really mess around with this if you know what you are doing. I myself still don't really know how it works.
Code (YAML):
items: ... speed-boost:
name: "&7&lSpeed Boost &7(Example Item)" item: SUGAR
# You can also add attribute modifiers (not recommended if you don't know what you're doing & know how to use it in game) attributemodifiers:
- attribute: GENERIC_MOVEMENT_SPEED
# list -> https://hub.spigotmc.org/javadocs/spigot/org/bukkit/attribute/Attribute.html modifier:
uuid: "49dc07dc-bfdb-4dc7-85d3-66ef52b51858"# uuid (/MUST/ BE UNIQUE! - https://www.uuidgenerator.net/) # if unspecified, items will not work through restarts as a # random one is generated each time the plugin is loaded name: "generic.movementSpeed" operation: ADD_NUMBER
# list -> https://hub.spigotmc.org/javadocs/spigot/org/bukkit/attribute/AttributeModifier.Operation.html amount: 0.03
equipmentslot: HAND
# (optional) list -> https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/EquipmentSlot.html - attribute: GENERIC_MOVEMENT_SPEED
modifier:
uuid: "e22513cf-b15f-4443-9e2f-103c0ff9731b"# as said before, unique to the previous one name: "generic.movementSpeed" operation: ADD_NUMBER
amount: 0.01
equipmentslot: OFF_HAND
lore: -
"&7Hold this item for a minor speed boost," -
"&7or consume it for a bigger speed boost." on-use:
commands: -
"effect give %player% minecraft:speed 30 3" cooldown: 30
New | ItemFlag support has been added.
Code (YAML):
items: ... instant-death:
name: "&c&lInstant Death &7(Example Item)" item: SPIDER_EYE
# You can give an item enchantments enchantments: # list -> https://hub.spigotmc.org/javadocs/spigot/org/bukkit/enchantments/Enchantment.html -
"ARROW_INFINITE:1" # + add the item flag to hide it itemflags: # list -> https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/ItemFlag.html -
"HIDE_ENCHANTS" lore: -
"&7Instantly kills you" on-use:
commands: -
"kill %player%"
items: ... infinite-cookie:
name: "&a&lMagic Cookie &7(Example Item)" item: COOKIE
# You can prevent items from being taken away when clicked consume: false
# You can also add a short cooldown to prevent it from being spammed cooldown: 60
lore: -
"&7Does not get consumed" commands: -
"heal %player%"
... messages: ... cooldown: "&cYou must wait &4%cooldown% &cseconds before using this item again."
New |Consumption messages can now be added to items
These will be sent to the player when an item is used
Code (YAML):
strength-sword:
name: "&e&lInstant Strength &7(Example Item)" item: GOLD_SWORD
# You can add messages which will be sent to the player upon consumption # You can use: # %item% for the name of the item # %player% for the players name # %cooldown% for players new cooldown after use messages: -
"&7&oYou feel a sudden rush of blood..." lore: -
"&7Gives you Strength 4" commands: -
"effect %player% 5 15 3"
Fix |A bug where an item would be used twice when looking at the ground has been fixed
This is a complete recode of the plugin. Your old configuration will be compatible with this version, however you may want to add some lines to the bottom to get full functionality out of this update:
Code (YAML):
...
# Options here options:
show-receive-message: true
# Messages here messages:
full-inv: "&c%player%'s inventory is full!" give-item: "&6Given &e%player% %item%&6." receive-item: "&6You have been given %item%&6."
New | Customisable messages
You can now change the receive and give messages (see above).
You can now disable the receive message (see above).
New | Consumption of items can now be disabled
You can add a new flag to each item, "consume", which is either true or false (default = true).
Code (YAML):
infinite-cookie:
name: "&a&lMagic Cookie &7(Example Item)" item: COOKIE
# You can prevent items from being taken away when clicked consume: false
lore: -
"&7Does not get consumed" commands: -
"heal %player%"
It can be also given under the key "durability" (your choice).
Data codes and durability are essentially the same thing in Bukkit, in this case the plugin will give you a Gold Sword with 32 durability (which means it will basically be destroyed with a single use, because durability works weird with Bukkit - durability 0 = full durability on the item).