mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 15:49:00 +01:00
Disable allowListing before received from client (#9167)
This commit is contained in:
parent
a4b55ff96a
commit
5f0081c256
1 changed files with 22 additions and 0 deletions
|
@ -0,0 +1,22 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
|
||||
Date: Sun, 23 Apr 2023 18:22:50 -0400
|
||||
Subject: [PATCH] Disable allowListing before received from client
|
||||
|
||||
The client does not send the packet needed to received this information until a little later, which can cause a condition where
|
||||
despite a player having disabled listing, they are able to be seen for a brief moment. This causes the player to be listed as an Anonymous
|
||||
Player until the actual configuration value is received from the client.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -0,0 +0,0 @@ public class ServerPlayer extends Player {
|
||||
this.recipeBook = new ServerRecipeBook();
|
||||
this.lastSectionPos = SectionPos.of(0, 0, 0);
|
||||
this.respawnDimension = Level.OVERWORLD;
|
||||
- this.allowsListing = true;
|
||||
+ this.allowsListing = false; // Paper - Set to false by default... wait for packet sent by client to populate
|
||||
this.wardenSpawnTracker = new WardenSpawnTracker(0, 0, 0);
|
||||
this.containerSynchronizer = new ContainerSynchronizer() {
|
||||
@Override
|
Loading…
Reference in a new issue