From b13f5e900f448f7a40f5df27373a5d2d96e22794 Mon Sep 17 00:00:00 2001
From: Camotoy <20743703+DoctorMacc@users.noreply.github.com>
Date: Mon, 14 Sep 2020 20:50:21 -0400
Subject: [PATCH] PlayerEntity: despawn even if still on the player list
 (#1263)

Fixes LibsDisguises not working, as it uses the same entity ID for the disguised entity and player. The player still appears on the player list.
---
 .../java/org/geysermc/connector/entity/PlayerEntity.java    | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/connector/src/main/java/org/geysermc/connector/entity/PlayerEntity.java b/connector/src/main/java/org/geysermc/connector/entity/PlayerEntity.java
index 0c269b10d..cc00403a0 100644
--- a/connector/src/main/java/org/geysermc/connector/entity/PlayerEntity.java
+++ b/connector/src/main/java/org/geysermc/connector/entity/PlayerEntity.java
@@ -86,12 +86,6 @@ public class PlayerEntity extends LivingEntity {
         if (geyserId == 1) valid = true;
     }
 
-    @Override
-    public boolean despawnEntity(GeyserSession session) {
-        super.despawnEntity(session);
-        return !playerList; // don't remove from cache when still on playerlist
-    }
-
     @Override
     public void spawnEntity(GeyserSession session) {
         if (geyserId == 1) return;