-
-
Notifications
You must be signed in to change notification settings - Fork 923
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
base: master
Are you sure you want to change the base?
Conversation
- 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.md` detailing all the placeholders that can be used.
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/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/PapiExpansion.java
Outdated
Show resolved
Hide resolved
|
- Simplifies mctop placeholders - Refactors mctop placeholders to use a single placeholder for both skill level/score and player name. - This removes the need for separate "mctop" and "mctop_name" placeholders, improving usability and reducing code duplication.
- This import is necessary for handling potential exceptions related to invalid skill references within the PlaceholderAPI expansion.
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.