Skip to content

Conversation

Javggg
Copy link
Contributor

@Javggg Javggg commented Sep 25, 2025

This fixes the name shown for the flag item in the inventory.
From this:
Captura de pantalla 2025-09-25 a la(s) 12 51 42 p m
To this:
Captura de pantalla 2025-09-25 a la(s) 12 52 06 p m

@Javggg Javggg changed the title Show proper flag name in inventory when captured on modern Show proper flag name in inventory on modern Sep 25, 2025
Copy link
Contributor

@TTtie TTtie left a comment

Choose a reason for hiding this comment

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

I think a more clean fix for this would be to render the translations in ModernColorUtils (see below) instead (this is done in 1.8, but not in modern)

Edit: appended blocks showing inconsistency between modern and 1.8:

@Override
public void setName(Component coloredName) {
meta.displayName(coloredName);
}

@Override
public void setName(Component coloredName) {
meta.setDisplayName(TextTranslations.translateLegacy(coloredName));
}

Comment on lines +116 to +118
ItemMeta itemMeta = bannerItem.getItemMeta();
itemMeta.setDisplayName(this.flag.getColoredName());
bannerItem.setItemMeta(itemMeta);
Copy link
Member

Choose a reason for hiding this comment

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

This should be elsewhere, the flag.getBannerItem() should already be getting a renamed flag, as that's done once instead of every time

go look at the constructor for Flag and figure out why its a problem there

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

Successfully merging this pull request may close these issues.

3 participants