mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-28 19:11:45 +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
|
@Override
|
||||||
protected boolean addViewer0(@NotNull Player player) {
|
protected boolean addViewer0(@NotNull Player player) {
|
||||||
final boolean result = super.addViewer0(player);
|
if (viewers.contains(player)) {
|
||||||
if (result) {
|
return false;
|
||||||
player.getPlayerConnection().sendPacket(getAddPlayerToList());
|
|
||||||
handleTabList(player.getPlayerConnection());
|
|
||||||
}
|
}
|
||||||
return result;
|
|
||||||
|
player.getPlayerConnection().sendPacket(getAddPlayerToList());
|
||||||
|
handleTabList(player.getPlayerConnection());
|
||||||
|
return super.addViewer0(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user