3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-25 15:50:14 +01:00

Properly translate player entity UUID for vaults

Dieser Commit ist enthalten in:
Camotoy 2024-06-15 22:40:29 -04:00
Ursprung 851ed36244
Commit 6025931c7d
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 7EEFB66FE798081F

Datei anzeigen

@ -76,9 +76,13 @@ public class VaultBlockEntityTranslator extends BlockEntityTranslator {
LongList bedrockPlayers = new LongArrayList(connectedPlayers.size());
for (int[] player : connectedPlayers) {
UUID uuid = uuidFromIntArray(player);
PlayerEntity playerEntity = session.getEntityCache().getPlayerEntity(uuid);
if (playerEntity != null) {
bedrockPlayers.add(playerEntity.getGeyserId());
if (uuid.equals(session.getPlayerEntity().getUuid())) {
bedrockPlayers.add(session.getPlayerEntity().getGeyserId());
} else {
PlayerEntity playerEntity = session.getEntityCache().getPlayerEntity(uuid);
if (playerEntity != null) {
bedrockPlayers.add(playerEntity.getGeyserId());
}
}
}
bedrockNbt.putList("connected_players", NbtType.LONG, bedrockPlayers);