Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-26 16:12:46 +01:00
Properly translate player entity UUID for vaults
Dieser Commit ist enthalten in:
Ursprung
851ed36244
Commit
6025931c7d
@ -76,9 +76,13 @@ public class VaultBlockEntityTranslator extends BlockEntityTranslator {
|
|||||||
LongList bedrockPlayers = new LongArrayList(connectedPlayers.size());
|
LongList bedrockPlayers = new LongArrayList(connectedPlayers.size());
|
||||||
for (int[] player : connectedPlayers) {
|
for (int[] player : connectedPlayers) {
|
||||||
UUID uuid = uuidFromIntArray(player);
|
UUID uuid = uuidFromIntArray(player);
|
||||||
PlayerEntity playerEntity = session.getEntityCache().getPlayerEntity(uuid);
|
if (uuid.equals(session.getPlayerEntity().getUuid())) {
|
||||||
if (playerEntity != null) {
|
bedrockPlayers.add(session.getPlayerEntity().getGeyserId());
|
||||||
bedrockPlayers.add(playerEntity.getGeyserId());
|
} else {
|
||||||
|
PlayerEntity playerEntity = session.getEntityCache().getPlayerEntity(uuid);
|
||||||
|
if (playerEntity != null) {
|
||||||
|
bedrockPlayers.add(playerEntity.getGeyserId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bedrockNbt.putList("connected_players", NbtType.LONG, bedrockPlayers);
|
bedrockNbt.putList("connected_players", NbtType.LONG, bedrockPlayers);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren