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 incorrect online count in custom quit message #5541

Merged
merged 3 commits into from
Oct 28, 2023
Merged

Fix incorrect online count in custom quit message #5541

merged 3 commits into from
Oct 28, 2023

Conversation

marcel2215
Copy link
Contributor

Information

This PR fixes #5540.

Details

Proposed fix:

Simply subtract 1 from the online player count, so the {ONLINE} placeholder is replaced with the number of players after someone leaves.

Environments tested:

OS: Oracle Cloud Linux

Java version:

java 21 2023-09-19 LTS
Java(TM) SE Runtime Environment (build 21+35-LTS-2513)
Java HotSpot(TM) 64-Bit Server VM (build 21+35-LTS-2513, mixed mode, sharing)
  • Most recent Paper version (1.XX.Y, git-Paper-BUILD)
  • CraftBukkit/Spigot/Paper 1.12.2
  • CraftBukkit 1.8.8

Demonstration:

Copy link
Member

@mdcfe mdcfe left a comment

Choose a reason for hiding this comment

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

I'm not super keen on this solution but I don't think there is a better alternative to this. Will defer to @JRoy / @pop4959 if they have other opinions.

Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
Copy link
Member

@JRoy JRoy left a comment

Choose a reason for hiding this comment

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

idk how else you do this but yeah this works

@JRoy JRoy changed the title Fix {online} placeholder being replaced with before-exit player count (#5540) Fix incorrect online count in custom quit message Oct 28, 2023
@JRoy JRoy enabled auto-merge (squash) October 28, 2023 22:28
@JRoy JRoy merged commit 3eceec8 into EssentialsX:2.x Oct 28, 2023
1 check passed
HarvelsX pushed a commit to HarvelsX/Essentials that referenced this pull request Jun 2, 2024
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
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.

Custom quit message shows outdated online player count
4 participants