-
-
Notifications
You must be signed in to change notification settings - Fork 926
Adds leaderboard support to PlaceholderAPI #5229
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
Conversation
nossr50
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like some stuff was included by accident that should be removed.
src/main/java/com/gmail/nossr50/placeholders/CheckLevelPlaceholder.java
Outdated
Show resolved
Hide resolved
src/main/java/com/gmail/nossr50/placeholders/McTopPositionPlaceholder.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds leaderboard support to PlaceholderAPI, enabling server administrators to display mcMMO ranking information through placeholders in menus, scoreboards, and other UI elements.
- Implements five new placeholder types for leaderboard queries and level checks
- Adds comprehensive documentation file
PLACEHOLDERS.mdwith usage examples - Updates visibility of
init()method from protected to private
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
src/main/java/com/gmail/nossr50/placeholders/PapiExpansion.java |
Adds getLeaderboard() helper method, registers new placeholder types, and changes init() visibility to private |
src/main/java/com/gmail/nossr50/placeholders/OverallRankPlaceholder.java |
New placeholder for displaying player's overall power level rank |
src/main/java/com/gmail/nossr50/placeholders/McTopPositionPlaceholder.java |
New placeholder for retrieving player name or level at specific leaderboard positions |
src/main/java/com/gmail/nossr50/placeholders/CheckLevelPlaceholder.java |
New placeholder for checking if player meets minimum skill level requirements |
src/main/java/com/gmail/nossr50/listeners/BlockListener.java |
Unrelated change: Modifies Fortune enchantment handling for block drops - should be in separate PR |
PLACEHOLDERS.md |
New documentation file detailing all available placeholders with examples and usage patterns |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/main/java/com/gmail/nossr50/placeholders/McTopPositionPlaceholder.java
Outdated
Show resolved
Hide resolved
src/main/java/com/gmail/nossr50/placeholders/CheckLevelPlaceholder.java
Outdated
Show resolved
Hide resolved
src/main/java/com/gmail/nossr50/placeholders/PapiExpansion.java
Outdated
Show resolved
Hide resolved
|
|
Just an update, been a bit busy irl this time of year, will be reviewing again soon, but this is likely to come in after the spears update. |
|
By the way, I think the PLACEHOLDERS.md file might be better on the wiki repo here: https://github.com/mcMMO-Dev/mcmmo-wiki-repo/blob/master/placeholders.md. Excellent work on it! |
|
Why is a colon ( |
I only kept the position structure from the original standard. PapiExpansion has a line for that: |
|
@hudsonandres if you add sufficient unit tests (preferably in Junit 5) I'd probably feel comfortable merging this, otherwise it's probably going to need to go into a dev branch when I find time to add them myself and then merge it into master later on, which would definitely slow down how quickly this feature would become available to others. Regarding the unit tests, feel free to mock up the responses and behavior from the DB classes as needed. |
Adds placeholders to display mcMMO leaderboard information through PlaceholderAPI.
%mcmmo_mctop_<skill>:<position>%%mcmmo_mctop_overall:<position>%%mcmmo_mctop_name_<skill>:<position>%%mcmmo_mctop_name_overall:<position>%%mcmmo_checklevel_<skill>:<level>%Added a new explanatory file
PLACEHOLDERS.mddetailing all the placeholders that can be used.