-
-
Notifications
You must be signed in to change notification settings - Fork 800
Fix: Playstation players crashing with too many player list entries #6012
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
0c15f26 to
67135bc
Compare
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 addresses a critical crash issue affecting PlayStation players when encountering servers with too many player list entries. The fix introduces a system property-based workaround that prevents player list entries from being sent to PlayStation clients when enabled.
Key changes:
- Introduces a system property
Geyser.NoPlayerListPsto enable player list limiting for PlayStation platforms - Adds conditional logic to skip adding player list entries for PS4 players when the property is enabled
- Implements cleanup logic in PlayerEntity despawn to handle the limited entry scenario
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| PlayerListUtils.java | Adds system property flag and utility method to check if player list entries should be limited for PlayStation platforms |
| JavaPlayerInfoUpdateTranslator.java | Conditionally skips adding player list entries and waypoint cache updates when limiting is enabled |
| PlayerEntity.java | Adds cleanup logic in despawnEntity to remove player list entries when limiting is active |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
| } | ||
|
|
||
| public static boolean shouldLimitPlayerlistEntries(GeyserSession session) { |
Copilot
AI
Jan 7, 2026
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.
The method name shouldLimitPlayerlistEntries has inconsistent capitalization in "Playerlist" (should be "PlayerList" with camel case). This inconsistency makes the API less discoverable and violates Java naming conventions.
| public static boolean shouldLimitPlayerlistEntries(GeyserSession session) { | |
| public static boolean shouldLimitPlayerListEntries(GeyserSession session) { |
| session.sendUpstreamPacket(unlistPacket); | ||
| } | ||
| } | ||
|
|
Copilot
AI
Jan 7, 2026
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.
The new method shouldLimitPlayerlistEntries lacks documentation explaining its purpose, when it should be used, and the implications of limiting player list entries. This is particularly important given the PR description mentions this is "not an ideal fix" that hides most player list entries.
| /** | |
| * Returns whether the number of player list entries sent to the given session should be limited. | |
| * <p> | |
| * This is a compatibility workaround for PlayStation 4 clients: when the {@code Geyser.NoPlayerListPs} | |
| * system property is enabled, most player list entries are hidden to avoid issues specific to that | |
| * platform (for example, performance or stability problems when large player lists are shown). | |
| * <p> | |
| * Callers should check this method before sending large {@link PlayerListPacket} batches and reduce | |
| * or skip entries when it returns {@code true}. Note that enabling this behavior means the in-game | |
| * player list as seen by Bedrock players on PS4 will be incomplete or mostly hidden, and should be | |
| * considered a non-ideal, temporary fix rather than the desired long-term behavior. | |
| * | |
| * @param session the session for which player list entries may be limited | |
| * @return {@code true} if player list entries should be limited for this session, {@code false} otherwise | |
| */ |
| import java.util.UUID; | ||
|
|
||
| public class PlayerListUtils { | ||
| private static final boolean HIDE_PLAYER_LIST_PS = Boolean.getBoolean("Geyser.NoPlayerListPs"); |
Copilot
AI
Jan 7, 2026
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.
The system property name "Geyser.NoPlayerListPs" uses an abbreviation "Ps" which could be ambiguous. It's unclear whether this refers to "PlayStation", "PS4", or potentially "player list". A more explicit name like "Geyser.HidePlayerListForPlayStation" or "Geyser.LimitPlayerListForPS4" would improve clarity.
| private static final boolean HIDE_PLAYER_LIST_PS = Boolean.getBoolean("Geyser.NoPlayerListPs"); | |
| // Prefer the clearer property name; keep the old one for backwards compatibility. | |
| private static final boolean HIDE_PLAYER_LIST_PS = | |
| Boolean.getBoolean("Geyser.HidePlayerListForPlayStation") | |
| || Boolean.getBoolean("Geyser.NoPlayerListPs"); |
| if (listed && PlayerListUtils.shouldLimitPlayerlistEntries(session)) { | ||
| PlayerListPacket packet = new PlayerListPacket(); | ||
| packet.getEntries().add(new PlayerListPacket.Entry(getTabListUuid())); | ||
| packet.setAction(PlayerListPacket.Action.REMOVE); | ||
| session.sendUpstreamPacket(packet); | ||
| listed = false; | ||
| } |
Copilot
AI
Jan 7, 2026
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.
The cleanup logic in despawnEntity checks if listed is true and PlayerList entries should be limited, but this scenario should not occur. When shouldLimitPlayerlistEntries() is true, entries are never added to the player list in the first place (see JavaPlayerInfoUpdateTranslator.java line 114-118), so listed should remain false. This suggests a logic inconsistency - the entity's listed field is being set to true even when the entry is never added to the Bedrock player list, creating a mismatch between the field's value and actual state. This defensive check may be working around a state management issue that should be fixed at the source.
| } | ||
|
|
||
| public static boolean shouldLimitPlayerlistEntries(GeyserSession session) { | ||
| return HIDE_PLAYER_LIST_PS && session.platform() == BedrockPlatform.PS4; |
Copilot
AI
Jan 7, 2026
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.
The check for limiting player list entries only considers PS4 platform, but PlayStation 5 (PS5) players may also experience the same crashing issue with too many player list entries. Consider whether PS5 should also be included in this platform check to provide consistent behavior across all PlayStation platforms.
| return HIDE_PLAYER_LIST_PS && session.platform() == BedrockPlatform.PS4; | |
| return HIDE_PLAYER_LIST_PS && (session.platform() == BedrockPlatform.PS4 || session.platform() == BedrockPlatform.PS5); |
|
Hey @onebeastchris im currently experiencing this on my server. Any additional testing or info you need that I could provide for you? |
|
Feel free to try out this exact PR build of Geyser and give Chris feedback to work with. |
This resolves issues like #5413
Not an ideal fix as it'll hide most player list entries; hence why this should proooobably be a config option?