Essentials
Essentials copied to clipboard
Add requirements for balancetop listing
Information
This PR closes #5307
Details
Proposed feature:
This pull request adds two requirements that the player must meet in order for their name to appear in the balance top list. Those two requirements are: 1) Minimum Balance and 2) Minimum Playtime
The requirements can be configured from the following additions to config.yml file:
# Requirements which must be met by the player to get their name shown in the balance top list.
# Playtime is in seconds.
baltop-requirements:
minimum-balance: 0
minimum-playtime: 0
Environments tested:
OS: Ubuntu 23.04
Java version: 17
- [x] Most recent Paper version (1.20.1, git-Paper-17)
- [ ] CraftBukkit/Spigot/Paper 1.12.2
- [ ] CraftBukkit 1.8.8
Demonstration:
Before configuring balance requirement (set to 0)
After configuring balance requirement
As you can see the name disappears from the list because min-balance required was 500 but the player had 499.
You need to maintain backwards compatibility for the
show-zero-baltopconfig option.
I have re-added the above config option and made necessary checks along with the new options.