RockinChaos / ItemJoin

Get custom items on join.
https://www.craftationgaming.com/
GNU Lesser General Public License v3.0
137 stars 35 forks source link

triton bug #560

Closed Dancbeunny98 closed 7 months ago

Dancbeunny98 commented 9 months ago

Server Version

1.19.4

Resource Version

latest

Dump Information

https://pastebin.com/MBERyzUY

Describe The Bug

We use the tritonmc plugin to do localization into several languages. What is the problem is that if we go to the server, our menus and item buttons have the same pernvld6i text, if we change the language, then everything will remain as it was, even if we re-enter the server. Thus, if we want the language to change, we need to clear the inventory and reissue items so that the language for the person changes, but there is no such functionality, in theory, we use plezzolders and they should change

Expected Behavior

-

Steps To Reproduce

-

Additional Info

-

Checklist

Dancbeunny98 commented 9 months ago

https://github.com/tritonmc/Triton/issues/347

RockinChaos commented 9 months ago

Okay so, technically this isn't a bug as all items are set with a "hard name" that doesn't change. And simply changing the language doesn't automagically update the items that already exist.

The best way I can explain it is; say you have a dirt block on the ground, but you tell the server all placed dirt blocks should actually be cobblestone. That's fine and good but you didn't tell the server to proactively change all dirt blocks to cobblestone for those that already exist.

I am unfamiliar with triton but theoretically, you should be able to update a player's existing items by adding the dynamic itemflag to them. Then use a placeholder in-place of the items name. This is how users previously did this with other similar plugins like tritonmc.

I'll do some testing on my end, but I suggest trying what I suggested above to see if that is the outcome you are looking for.

RockinChaos commented 7 months ago

Okay after some testing I can confirm the dynamic itemflag serves this purpose. Simply add it to your list of itemflags on your items; itemflags: dynamic (for example).

Then the items will update with-in 3 seconds of changing languages. Furthermore utilizing placeholders for this in conjunction with the dynamic itemflag makes for the best experience.