Open ImBas opened 4 months ago
TODO: Look into adding item flag specification for tools as well, to allow restriction for items with item flags on interaction/use triggers
Rather than adding itemflag specification into tools, consider using new OD ItemStack type See 58728e2b5c49092a9fd298e268d3b13f18334bfa
If you get the tool w/ the flags desired in-game and use /od saveitem speedsword
you can then reference it within OD!
See example in OD below
ANY_BLOCK:
- trigger: RIGHT_CLICK
tool: OD_ITEM@speedsword
message: "&aSuccessfully clicked with your tool!"
See serialized ItemStack below
speedsword:
==: org.bukkit.inventory.ItemStack
v: 3218
type: DIAMOND_SWORD
meta:
==: ItemMeta
meta-type: UNSPECIFIC
display-name: '["",{"text":"Test Name","italic":false}]'
lore:
- '["",{"text":"Giving Lore","italic":false}]'
attribute-modifiers:
GENERIC_MOVEMENT_SPEED:
- ==: org.bukkit.attribute.AttributeModifier
amount: 1.0
name: '1728939246870'
slot: HAND
uuid: fffe180e-0000-9bc6-0002-84a2fffec874
operation: 0
Hi there,
As mentioned on the Discord, it would be amazing to see support for ItemFlags added to OtherDrops (reference: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/inventory/ItemFlag.html)
For example, this would allow to create an item like the one below, and hide the unbreaking X enchant:
ITEM@!UNBREAKING#10@!~&aItem name;&7Item lore;
Possible idea to implement this while respecting the current format could be to have it after enchants, like:
ITEM@!UNBREAKING#10!HIDE_ENCHANTS#true!HIDE_ATTRIBUTES#true@!~&aItem name;&7Item lore;
(or 1 for true 0 for false, just an idea though)Thanks!
EDIT: If anyone stumbles upon this post, it's now possible to do it like below: