diff --git a/bootstrap/bungeecord/pom.xml b/bootstrap/bungeecord/pom.xml
index 54e0d56ef..10855aed4 100644
--- a/bootstrap/bungeecord/pom.xml
+++ b/bootstrap/bungeecord/pom.xml
@@ -20,7 +20,7 @@
net.md-5
bungeecord-api
- 1.15-SNAPSHOT
+ 1.16-R0.4-SNAPSHOT
provided
diff --git a/connector/src/main/java/org/geysermc/connector/network/session/cache/EntityCache.java b/connector/src/main/java/org/geysermc/connector/network/session/cache/EntityCache.java
index 40000551c..a2eb60053 100644
--- a/connector/src/main/java/org/geysermc/connector/network/session/cache/EntityCache.java
+++ b/connector/src/main/java/org/geysermc/connector/network/session/cache/EntityCache.java
@@ -128,8 +128,8 @@ public class EntityCache {
return playerEntities.get(uuid);
}
- public void removePlayerEntity(UUID uuid) {
- playerEntities.remove(uuid);
+ public PlayerEntity removePlayerEntity(UUID uuid) {
+ return playerEntities.remove(uuid);
}
public void addBossBar(UUID uuid, BossBar bossBar) {
diff --git a/connector/src/main/java/org/geysermc/connector/network/translators/java/entity/player/JavaPlayerListEntryTranslator.java b/connector/src/main/java/org/geysermc/connector/network/translators/java/entity/player/JavaPlayerListEntryTranslator.java
index cd627c645..b8a7972c8 100644
--- a/connector/src/main/java/org/geysermc/connector/network/translators/java/entity/player/JavaPlayerListEntryTranslator.java
+++ b/connector/src/main/java/org/geysermc/connector/network/translators/java/entity/player/JavaPlayerListEntryTranslator.java
@@ -25,6 +25,11 @@
package org.geysermc.connector.network.translators.java.entity.player;
+import com.github.steveice10.mc.protocol.data.game.PlayerListEntry;
+import com.github.steveice10.mc.protocol.data.game.PlayerListEntryAction;
+import com.github.steveice10.mc.protocol.packet.ingame.server.ServerPlayerListEntryPacket;
+import com.nukkitx.math.vector.Vector3f;
+import com.nukkitx.protocol.bedrock.packet.PlayerListPacket;
import org.geysermc.connector.GeyserConnector;
import org.geysermc.connector.entity.player.PlayerEntity;
import org.geysermc.connector.network.session.GeyserSession;
@@ -32,12 +37,6 @@ import org.geysermc.connector.network.translators.PacketTranslator;
import org.geysermc.connector.network.translators.Translator;
import org.geysermc.connector.skin.SkinManager;
-import com.github.steveice10.mc.protocol.data.game.PlayerListEntry;
-import com.github.steveice10.mc.protocol.data.game.PlayerListEntryAction;
-import com.github.steveice10.mc.protocol.packet.ingame.server.ServerPlayerListEntryPacket;
-import com.nukkitx.math.vector.Vector3f;
-import com.nukkitx.protocol.bedrock.packet.PlayerListPacket;
-
@Translator(packet = ServerPlayerListEntryPacket.class)
public class JavaPlayerListEntryTranslator extends PacketTranslator {
@Override
@@ -57,9 +56,6 @@ public class JavaPlayerListEntryTranslator extends PacketTranslator
- GeyserConnector.getInstance().getLogger().debug("Loaded Local Bedrock Java Skin Data"));
} else {
playerEntity = session.getEntityCache().getPlayerEntity(entry.getProfile().getId());
}
@@ -74,27 +70,35 @@ public class JavaPlayerListEntryTranslator extends PacketTranslator
+ GeyserConnector.getInstance().getLogger().debug("Loaded Local Bedrock Java Skin Data for " + session.getClientData().getUsername()));
+ } else {
+ playerEntity.setValid(true);
+ PlayerListPacket.Entry playerListEntry = SkinManager.buildCachedEntry(session, playerEntity);
- translate.getEntries().add(playerListEntry);
+ translate.getEntries().add(playerListEntry);
+ }
break;
case REMOVE_PLAYER:
- PlayerEntity entity = session.getEntityCache().getPlayerEntity(entry.getProfile().getId());
+ // As the player entity is no longer present, we can remove the entry
+ PlayerEntity entity = session.getEntityCache().removePlayerEntity(entry.getProfile().getId());
if (entity != null) {
// Just remove the entity's player list status
// Don't despawn the entity - the Java server will also take care of that.
entity.setPlayerList(false);
}
- // As the player entity is no longer present, we can remove the entry
- session.getEntityCache().removePlayerEntity(entry.getProfile().getId());
if (entity == session.getPlayerEntity()) {
// If removing ourself we use our AuthData UUID
translate.getEntries().add(new PlayerListPacket.Entry(session.getAuthData().getUUID()));
@@ -105,7 +109,7 @@ public class JavaPlayerListEntryTranslator extends PacketTranslator