Skip to content

Conversation

@NShadeIV
Copy link
Collaborator

No description provided.

@NShadeIV NShadeIV requested a review from crashdemons October 29, 2025 00:25
@NShadeIV NShadeIV self-assigned this Oct 29, 2025
Copy link
Owner

@crashdemons crashdemons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs further investigation into BungeeChat serialization/NBT or GSON errors.

try {
// Note: `serializeItemAsJson` is a Paper API method
Map<String, Object> serializedItem = bukkitItem.serialize();
String json = GSON.toJson(serializedItem);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is skipped in my test environment due to a ReflectionOperationException from GSON.
Not sure if this my issue or GSON's.

try {
nbt = bukkitItem.getItemMeta().getAsString();
final net.md_5.bungee.api.chat.ItemTag tag = (nbt != null && !nbt.isEmpty()) ? net.md_5.bungee.api.chat.ItemTag.ofNbt(nbt) : null;
return new HoverEvent(HoverEvent.Action.SHOW_ITEM, new net.md_5.bungee.api.chat.hover.content.Item(id, count, tag));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code runs and works for me, but doesn't display the metadata in the chat.
(just getting this into github so I don't forget)

This is also basically the same as what I'm doing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants