From 874869cef8012df4cbc8568d685820a54bacd4e1 Mon Sep 17 00:00:00 2001 From: games647 Date: Tue, 28 Jun 2016 12:25:46 +0200 Subject: [PATCH] Fix NPC showing when authenticated (Fixes #791) --- .../listener/protocollib/AuthMeTablistPacketAdapter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/fr/xephi/authme/listener/protocollib/AuthMeTablistPacketAdapter.java b/src/main/java/fr/xephi/authme/listener/protocollib/AuthMeTablistPacketAdapter.java index dd24bdb16..a26bec83c 100644 --- a/src/main/java/fr/xephi/authme/listener/protocollib/AuthMeTablistPacketAdapter.java +++ b/src/main/java/fr/xephi/authme/listener/protocollib/AuthMeTablistPacketAdapter.java @@ -42,8 +42,9 @@ public class AuthMeTablistPacketAdapter extends PacketAdapter { @Override public void onPacketSending(PacketEvent packetEvent) { + Player receiver = packetEvent.getPlayer(); if (packetEvent.getPacketType() == PacketType.Play.Server.PLAYER_INFO - && PlayerCache.getInstance().isAuthenticated(packetEvent.getPlayer().getName().toLowerCase())) { + && !PlayerCache.getInstance().isAuthenticated(receiver.getName().toLowerCase())) { //this hides the tablist for the new joining players. Already playing users will see the new player try { PacketContainer packet = packetEvent.getPacket();