ItemJoin

ItemJoin

157k Downloads

hide-attributes not honored

SlimeDog opened this issue ยท 5 comments

commented

Spigot 1.15.2
ItemJoin 5.0.6-b364

items.yml includes

  changeWorld-tool:
    id: CLOCK
    slot: 8
    count: 1
    name: '&bNavigate'
    lore:
      - 'Teleport elsewhere'
    commands:
      right-click:
        - 'deluxemenus open navigation'
    enchantment: FIRE_ASPECT:1
    itemflags: cancel-events, death-drops, hide-attributes, hide-durability, inventory-modify, placement, self-drops, unbreakable
    triggers: join, respawn, world-change
    permission-node: 'deluxemenus.open'

but item attributes are displayed. Please advise what I am doing wrong.

Screen Shot 2020-02-26 at 8 53 35 PM

commented

Hello SlimeDog

I cant seem to replicate your issue. Did you have the item before you added the hide-attributes flag? Because if yes, you have to clear this copy and give it to youreslf again with "/ij get changeWorld-tool" . If not it most likely is a problem with either another plugin or with the Bukkit/Spigot/Paper version you are using.

commented

Apparently, yes (I don't know how one would have guessed that reload wouldn't do the needful, but there you have it). Note that one has to do this magic

  • ij remove changeWorld-tool
  • ij get changeWorld-tool

in every affected world, but it does resolve the issue.

commented

It might be worthwhile adding a note to the wiki concerning the issue. If (certain?) itemflags are added to the IJ item definition, the item must be regenerated. ij reload will not do the needful.

commented

... I will also look to create a new itemflag that regenerates ALL of the attributes of the item so that regenerating the item is not needed.

Please. Maybe a config option that does the equivalent of remove/get whenever a player enters a world (ie., generates an IJ item). Given the state of play, this seems useful. In fact, maybe it should always happen (config or no). Why not just regenerate IJ item(s) every time?

commented

Yeah, typically when one changes the item in the items.yml you need to regenerate the item in the player's inventory. ( even if it was as simple as a config node change since its stores in the items nbt tags ). Things such as commands/lore/ name/ skull-owner/texture etc can be changed and automatically updated to the item by adding the dynamic or animated itemflag to the item but it does not regen all the attributes such as certain itemflags like hide-attributes.

I will add a note about this in the wiki and I will also look to create a new itemflag that regenerates ALL of the attributes of the item so that regenerating the item is not needed.