mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-08 03:29:41 +01:00
Fix NPC showing when authenticated (Fixes #791)
This commit is contained in:
parent
2f341029a6
commit
874869cef8
@ -42,8 +42,9 @@ public class AuthMeTablistPacketAdapter extends PacketAdapter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPacketSending(PacketEvent packetEvent) {
|
public void onPacketSending(PacketEvent packetEvent) {
|
||||||
|
Player receiver = packetEvent.getPlayer();
|
||||||
if (packetEvent.getPacketType() == PacketType.Play.Server.PLAYER_INFO
|
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
|
//this hides the tablist for the new joining players. Already playing users will see the new player
|
||||||
try {
|
try {
|
||||||
PacketContainer packet = packetEvent.getPacket();
|
PacketContainer packet = packetEvent.getPacket();
|
||||||
|
Loading…
Reference in New Issue
Block a user