Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix /nick off breaking with changecolor permissions #4876

Merged
merged 2 commits into from
Mar 31, 2022

Conversation

Deltric
Copy link
Contributor

@Deltric Deltric commented Mar 30, 2022

Information

This PR fixes #4822 .

Details

Proposed fix:

The bug stems from a race condition between formatNickname method and the updatePlayer method.
My fix adds an additional check to the only color changes if statement to make sure its not the off argument.

Environments tested:

OS: Windows 11

Java version: 17.0.1

  • Most recent Paper version (1.XX.Y, git-Paper-BUILD)
  • CraftBukkit/Spigot/Paper 1.12.2
  • CraftBukkit 1.8.8

Demonstration:

Before Fix: (Tested with EssentialsX 2.19.4 and 2.20.0-dev+4-4bd1b3c)
image

After Fix: (Tested by using the compiled version with this commit)
image

@JRoy JRoy added bug: confirmed Confirmed bugs in EssentialsX. module: main Issues or PRs for the main Essentials module labels Mar 31, 2022
@JRoy JRoy added this to the 2.20.0 milestone Mar 31, 2022
@JRoy
Copy link
Member

JRoy commented Mar 31, 2022

Not a race condition but thanks for the catch none the less!

@JRoy JRoy changed the title Fix nickname off for color only nicknames Fix /nick off breaking for changecolor permissions Mar 31, 2022
@JRoy JRoy changed the title Fix /nick off breaking for changecolor permissions Fix /nick off breaking with changecolor permissions Mar 31, 2022
@JRoy JRoy merged commit d891268 into EssentialsX:2.x Mar 31, 2022
PureGero pushed a commit to CritterzNFT/Essentials that referenced this pull request Apr 20, 2022
@mdcfe mdcfe modified the milestones: 2.20.0, 2.19.5 Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: confirmed Confirmed bugs in EssentialsX. module: main Issues or PRs for the main Essentials module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nickname Off Bug
3 participants