mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-15 20:51:34 +01:00
Fix adding viewers to FakePlayer (#497)
This commit is contained in:
parent
3685bf22b7
commit
0b7b7283e6
@ -130,12 +130,13 @@ public class FakePlayer extends Player implements NavigableEntity {
|
||||
|
||||
@Override
|
||||
protected boolean addViewer0(@NotNull Player player) {
|
||||
final boolean result = super.addViewer0(player);
|
||||
if (result) {
|
||||
player.getPlayerConnection().sendPacket(getAddPlayerToList());
|
||||
handleTabList(player.getPlayerConnection());
|
||||
if (viewers.contains(player)) {
|
||||
return false;
|
||||
}
|
||||
return result;
|
||||
|
||||
player.getPlayerConnection().sendPacket(getAddPlayerToList());
|
||||
handleTabList(player.getPlayerConnection());
|
||||
return super.addViewer0(player);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user