|
5 | 5 | private static final Logger LOGGER = LogUtils.getLogger();
|
6 | 6 | private static final Component DISCONNECT_REASON_INVALID_DATA = Component.translatable("multiplayer.disconnect.invalid_player_data");
|
7 | 7 | - private final GameProfile gameProfile;
|
8 |
| -- private final Queue<ConfigurationTask> configurationTasks = new ConcurrentLinkedQueue<>(); |
9 | 8 | + public final GameProfile gameProfile; // Paper
|
10 |
| -+ public final Queue<ConfigurationTask> configurationTasks = new ConcurrentLinkedQueue<>(); // Paper |
| 9 | + private final Queue<ConfigurationTask> configurationTasks = new ConcurrentLinkedQueue<>(); |
11 | 10 | @Nullable
|
12 | 11 | private ConfigurationTask currentTask;
|
13 | 12 | - private ClientInformation clientInformation;
|
|
61 | 60 | }
|
62 | 61 |
|
63 | 62 | @Override
|
64 |
| -@@ -139,16 +_,30 @@ |
| 63 | +@@ -139,16 +_,36 @@ |
65 | 64 | return;
|
66 | 65 | }
|
67 | 66 |
|
|
80 | 79 | + this.disconnect(component);
|
81 | 80 | + return;
|
82 | 81 | + }
|
| 82 | ++ ServerPlayer playerForLogin; |
| 83 | ++ if (this.connection.savedPlayerForLoginEventLegacy != null) { |
| 84 | ++ playerForLogin = this.connection.savedPlayerForLoginEventLegacy; |
| 85 | ++ // WE have to do this because the player isnt updated properly |
| 86 | ++ playerForLogin.updateOptions(this.clientInformation); |
| 87 | ++ } else { |
| 88 | ++ playerForLogin = playerList.getPlayerForLogin(this.gameProfile, this.clientInformation); |
| 89 | ++ } |
83 | 90 | + // Paper end
|
84 |
| -+ ServerPlayer playerForLogin = java.util.Objects.requireNonNullElseGet(this.connection.savedPlayerForLoginEventLegacy, () -> playerList.getPlayerForLogin(this.gameProfile, this.clientInformation)); // Paper - legacy serverlogin |
85 |
| -+ playerForLogin.updateOptions(this.clientInformation); // Paper - update options for legacy player |
86 | 91 | playerList.placeNewPlayer(this.connection, playerForLogin, this.createCookie(this.clientInformation));
|
87 | 92 | } catch (Exception var5) {
|
88 | 93 | LOGGER.error("Couldn't place player in world", (Throwable)var5);
|
|
0 commit comments