Skip to content

### Information - #6607

Open
1wairesd wants to merge 3 commits into
EssentialsX:2.xfrom
1wairesd:2.x
Open

### Information#6607
1wairesd wants to merge 3 commits into
EssentialsX:2.xfrom
1wairesd:2.x

Conversation

@1wairesd

Copy link
Copy Markdown
Contributor

This PR fixes.

Details

Proposed fix:
Fixed incorrect locale key numbering for the /exp command: expCommandUsage4Description was renamed to expCommandUsage3Description in both messages.properties and messages_ru.properties. This caused a MissingResourceException when players used /exp with insufficient arguments.

Additionally, improved tab-completion for /exp give|set|take so that player names are only suggested when the user has the corresponding .others permission (e.g. essentials.exp.give.others). Without this permission, only amount values are suggested.

Environments tested:

OS: Windows

Java version: 21

  • Most recent Paper version (1.21.11, Purpur-1.21.11-2568-f57bd86)
  • CraftBukkit/Spigot/Paper 1.12.2
  • CraftBukkit 1.8.8

Demonstration:
Before: /exp command throws MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key expCommandUsage3Description
After: Help message displays correctly without errors.

1wairesd and others added 3 commits May 31, 2026 20:23
PatternType.getByIdentifier() causes IncompatibleClassChangeError on
1.19.4 due to a mismatch between Methodref and InterfaceMethodref
bytecode constants when compiled against a newer API.

Introduce PatternTypeProvider with two implementations:
- LegacyPatternTypeProvider: iterates PatternType.values() for 1.19.4
  and older where PatternType is still an enum
- ModernPatternTypeProvider: uses Registry.BANNER_PATTERN for 1.20.5+

Update MetaItemStack.addBannerMeta to resolve PatternType through the
provider instead of calling the deprecated static method directly.
- Fix typo expCommandUsage4Description -> expCommandUsage3Description in messages.properties and messages_ru.properties
- Tab-complete for /exp give|set|take no longer suggests player names without .others permission

@JRoy JRoy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm, just need to move the other usage string up one.

Comment on lines 379 to 380
expCommandUsage5=/<command> reset <playername>
expCommandUsage5Description=Resets the target player's xp to 0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

rename these to Usage4

expCommandUsage2Description=Устанавливает опыт игрока на указанное количество
expCommandUsage3=/<command> show <игрок>
expCommandUsage4Description=Отображает количество опыта указанного игрока
expCommandUsage3Description=Отображает количество опыта указанного игрока

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

changes to other locales won't be saved, when this PR is merged it will need to be updated on Crowdin.

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.

2 participants