mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-27 21:19:00 +01:00
Prevent the Vanish API from sending unnecessary packets.
This commit is contained in:
parent
5ae8f13fde
commit
54e45b7d66
@ -564,6 +564,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
|
||||
public void hidePlayer(Player player) {
|
||||
if (hiddenPlayers.contains(player)) return;
|
||||
hiddenPlayers.add(player);
|
||||
|
||||
//remove this player from the hidden player's EntityTrackerEntry
|
||||
@ -579,6 +580,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
|
||||
public void showPlayer(Player player) {
|
||||
if (!hiddenPlayers.contains(player)) return;
|
||||
hiddenPlayers.remove(player);
|
||||
|
||||
EntityTracker tracker = ((WorldServer) entity.world).tracker;
|
||||
|
Loading…
Reference in New Issue
Block a user