fix: my_island placeholders fall back to team island for members - #53
Merged
Conversation
The my_island_* placeholder lookup only resolved islands the player owns, so plain team members (who own no island) got the empty defaults (0, 0%, Unknown). Prefer an owned island as before, but fall back to the team island the player is a member of when they own none. Same fix as BentoBoxWorld/AOneBlock#560 (this code was forked from AOneBlock). See BentoBoxWorld/AOneBlock#559. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PtmXKNJ5fSZ9sEumeFDEBc
|
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.



Summary
Ports BentoBoxWorld/AOneBlock#560 (reported as BentoBoxWorld/AOneBlock#559) — ChunkBlock forked the same placeholder code and has the identical bug.
getUsersIsland()only resolved islands the player owns, so a plain team member (who owns no island of their own) got the empty defaults —0,0%,Unknown— from everymy_island_*placeholder (including the chunk territory placeholders, which use the same helper).Fix
getUsersIsland()now uses a preference order instead of a hard owner-only filter:disallow-team-member-islands: false).Testing
testTeamMemberWithoutOwnedIslandcovering the team-member scenario.🤖 Generated with Claude Code
https://claude.ai/code/session_01PtmXKNJ5fSZ9sEumeFDEBc