Implement default PlayerDisplayNameProvider API#803
Draft
TechnicJelle wants to merge 1 commit into
Draft
Conversation
TBlueF
reviewed
May 14, 2026
Comment on lines
+42
to
+45
| // TODO: I am not happy with needing to do this here. | ||
| // The place that calls this function already loops over the online players, so this loops double! | ||
| // I can't really think of a better way to do this right now, though. | ||
| for (Player onlinePlayer : this.server.getOnlinePlayers()) { |
Member
There was a problem hiding this comment.
I would be fine with changing the Server#getOnlinePLayer() method into a Map<UUID, Player> .. this would then also need to be implemented in all implementations though ofc..
Comment on lines
-51
to
+54
| public LivePlayersDataSupplier(Server server, PluginConfig config, World world, Predicate<UUID> playerFilter) { | ||
| public LivePlayersDataSupplier(Plugin plugin, Server server, PluginConfig config, World world, Predicate<UUID> playerFilter) { | ||
| this.plugin = plugin; |
Member
There was a problem hiding this comment.
I already don't like passing the PluginConfig here, now also passing the Plugin screams that this needs to be refactored somehow that this is not needed.
For now, passing the PlayerDisplayNameProvider directly would be the most passable i think ..
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implemented a default for the API added in BlueMap-Minecraft/BlueMapAPI#9
I'm not all too happy about it all yet, especially the locations of some things and what I had to pass into other places.
Also, the default implementation currently kind of sucks.
I'd be happy to get feedback on this!
Screenshots of this working
Addon plugin code