diff --git a/src/de/steamwar/lobby/display/NPC.java b/src/de/steamwar/lobby/display/NPC.java index e24c3f2..8e0e6e5 100644 --- a/src/de/steamwar/lobby/display/NPC.java +++ b/src/de/steamwar/lobby/display/NPC.java @@ -22,6 +22,8 @@ package de.steamwar.lobby.display; import com.comphenix.tinyprotocol.Reflection; import com.comphenix.tinyprotocol.TinyProtocol; import com.mojang.authlib.GameProfile; +import de.steamwar.lobby.LobbySystem; +import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.entity.Player; @@ -143,7 +145,9 @@ public class NPC { } private void hide(Player player) { - TinyProtocol.instance.sendPacket(player, removePlayerInfo); + if (Bukkit.getOnlinePlayers().stream().noneMatch(p -> p.getUniqueId().equals(uuid))) { + TinyProtocol.instance.sendPacket(player, removePlayerInfo); + } TinyProtocol.instance.sendPacket(player, destroy); }