Repository navigation
Enable /team with thread safe scoreboard teams - #519
Closed
lewisgibson wants to merge 2 commits into
Closed
lewisgibson wants to merge 2 commits into
lewisgibson wants to merge 2 commits into
Conversation
/team is disabled because scoreboard state is shared by all regions. Make teams thread safe and enable the team subcommands. See the patch for details.
|
Do not spam this repository with your AI slop |
Author
|
Hello. Have you actually reviewed the changes? This is not slop, and I know what I'm doing. I've been working on changes for a while and intentionally broke these out so they're easier to review |
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.
/teamis disabled in the base patch because the scoreboard is shared by every region. This enables it as a feature patch: every/teamsubcommand runs on the global region, like/timeand/weather, so team changes are applied one at a time. The team maps become concurrent and the team options volatile so thatEntity#getTeam, which was stubbed to return null, can read them from any region again. A joining player is sent the existing teams from a global region task and only receives team changes after that, so each team reaches it exactly once./scoreboard,/teammsgand the Bukkit scoreboard API stay disabled. Like/timeand/weather, the command's result is not returned to the caller, soexecute storeon/teamgets 1.Tested on ver/26.2.x with a headless client script that counts the team packets each client receives. 9 of 9 checks pass:
team add,modifyandjoinfrom the console, the set_player_team packet reaching a connected client,@s[team=red]matching and@s[team=blue]not (that isEntity#getTeam), a late joiner receiving each existing team once, every one of 9 clients seeing each of 40 teams exactly once while 6 of them join, and no exception or leftover team after the console and a player hammer add, join and remove on the same teams at once. On the unpatched build the first check fails because/teamis not registered.This was done with AI (Claude Opus 5.5 and GPT Astra, high effort). I've reviewed it and tested it myself.