Zrips / CMI

117 stars 99 forks source link

CMI "[Item]" Show in Chat not working #9028

Open b01w opened 3 months ago

b01w commented 3 months ago

Description of Issue

When you write [item] over an Oraxen item in chat it isn't previewing the full custom name on the item in chat, its instead just displaying the material name. As far as I know this is because oraxen switched from using the old display_name type to the new item_name type, lots of other plugins have also broken from this so I thought I would also report this here. Its more of a large cosmetic issue but the functionality is still there, this could also be breaking in other systems with CMI so best to update the entire thing for this new item naming method.

Version Information

9.7.5.0

Errors

None

Relevant Config Sections

None

Relevant Plugins

Oraxen Latest Version

Agreements

Zrips commented 3 months ago

You can try checking locale file, its around line 306, set it to something like item: '&7[%cmi_iteminhand_displayname%[amount]&7]' which should then show items display name and not its base material

b01w commented 3 months ago

I think the issue is because oraxen does not use display name anymore, it uses the new itemname feature on 1.20.5+ so there would need to be support from this from CMI

Zrips commented 3 months ago

Can you elaborate more on what you mean by "new itemname feature"

b01w commented 3 months ago

https://imgur.com/a/VdWEIfP

This is what I've been told my b0y to share around from oraxen

Zrips commented 2 months ago

While ItemStack@getDisplayName() is deprecated by Paper, it's still should return items display name. Duno what "issues" he is talking about with existing methods, but using deprecated method should still return items displayName, as its only deprecated and not removed.

b01w commented 2 months ago

When you use [item] in chat it doesn't show the items name in chat (does when you hover over the item), it shows the material name in chat, not the item name

CloudeLecaw commented 2 months ago

there are some places like ctellraw too where it doesnt work see here https://github.com/Zrips/CMI/discussions/6116