mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-25 10:29:41 -05:00
[Bleeding] Implemented Vanish API.
Remove players that cannot see a player from their EntityTrackerEntry and only send user list updates to players who can see the player they reference.
This commit is contained in:
1 parent
028cbb8fe9
commit
37c8868532
4 files changed
+82
-25
No files matched your search
@@ -187,6 +187,14 @@ public class EntityTrackerEntry {
|
||||
|
||||
if (d0 >= (double) (-this.b) && d0 <= (double) this.b && d1 >= (double) (-this.b) && d1 <= (double) this.b) {
|
||||
if (!this.trackedPlayers.contains(entityplayer)) {
|
||||
// CraftBukkit start
|
||||
if (tracker instanceof EntityPlayer) {
|
||||
org.bukkit.entity.Player player = ((EntityPlayer) tracker).getBukkitEntity();
|
||||
if (!entityplayer.getBukkitEntity().canSee(player)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
||||
this.trackedPlayers.add(entityplayer);
|
||||
entityplayer.netServerHandler.sendPacket(this.b());
|
||||
if (this.isMoving) {
|
||||
|
||||
Reference in new issue
Block a user