Repository navigation
Conversation
Member
|
Give me an example of such placeholder that requires a player |
Contributor
Author
After a thorough analysis |
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.
Changelog
world_enabled/generated/unlockedplaceholdersgenerator_amountandgenerator_percentageplaceholders.island_mission_statusplaceholder intoplayer_mission_statusandisland_mission_status, rather than handling both variants withinisland_mission_status, for consistent with how other mission placeholders works..topplaceholders.parsePlaceholdersForIsland(), because the sub-placeholder alone is enough. Previously, the implementation was inconsistent, sometimes using the main placeholder and other times the sub-placeholder.registerPlaceholder()methods.I also discovered an issue - player placeholders and certain island placeholders (I’ve temporarily removed this condition for island placeholders while waiting for a better, comprehensive solution from you) that accept additional arguments required the
SuperiorPlayerobject to beNotNull. However, standard placeholders (from staticImmutableMap) had no such requirement, which could lead to exceptions being thrown. For player placeholders, the fix is straightforward - simply require theSuperiorPlayerto beNotNull. It’s a bit more complex for island placeholders, though, since we allow the parsing of any island-related placeholder for an island at a specific position in the 'top' rankings, which can be parsed for not a player - how should we handle this effectively? Most of the placeholders (with the exception of thepermissionplaceholder) actually require aLocalerather than aSuperiorPlayerobject - which could otherwise serve as a source for the default locale - but the parser provided in the API relies on theSuperiorPlayerobject. I’m not sure how to resolve this in a sensible way, so I’m leaving it as is for now and awaiting your response.And don't worry - this time I’ve verified that all the placeholders work.