[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:
@@ -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