@@ -133,7 +133,7 @@
|
||||
this.entity = entity;
|
||||
this.range = i;
|
||||
this.lastSectionPos = SectionPosition.of(entity);
|
||||
@@ -1435,12 +1479,20 @@
|
||||
@@ -1435,12 +1479,17 @@
|
||||
|
||||
public void updatePlayer(EntityPlayer entityplayer) {
|
||||
if (entityplayer != this.entity) {
|
||||
@@ -145,11 +145,8 @@
|
||||
boolean flag = d1 <= d2 && this.entity.broadcastToPlayer(entityplayer);
|
||||
|
||||
+ // CraftBukkit start - respect vanish API
|
||||
+ if (this.entity instanceof EntityPlayer) {
|
||||
+ Player player = ((EntityPlayer) this.entity).getBukkitEntity();
|
||||
+ if (!entityplayer.getBukkitEntity().canSee(player)) {
|
||||
+ flag = false;
|
||||
+ }
|
||||
+ if (!entityplayer.getBukkitEntity().canSee(this.entity.getBukkitEntity())) {
|
||||
+ flag = false;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
if (flag) {
|
||||
|
||||
@@ -399,7 +399,7 @@
|
||||
double d2 = (double) blockposition.getZ() - entityplayer.getZ();
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ if (entityhuman != null && entityhuman instanceof EntityPlayer && !entityplayer.getBukkitEntity().canSee(((EntityPlayer) entityhuman).getBukkitEntity())) {
|
||||
+ if (entityhuman != null && !entityplayer.getBukkitEntity().canSee(entityhuman.getBukkitEntity())) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
||||
@@ -598,7 +598,7 @@
|
||||
+ public void broadcastAll(Packet packet, EntityHuman entityhuman) {
|
||||
+ for (int i = 0; i < this.players.size(); ++i) {
|
||||
+ EntityPlayer entityplayer = this.players.get(i);
|
||||
+ if (entityhuman != null && entityhuman instanceof EntityPlayer && !entityplayer.getBukkitEntity().canSee(((EntityPlayer) entityhuman).getBukkitEntity())) {
|
||||
+ if (entityhuman != null && !entityplayer.getBukkitEntity().canSee(entityhuman.getBukkitEntity())) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ ((EntityPlayer) this.players.get(i)).connection.send(packet);
|
||||
@@ -638,7 +638,7 @@
|
||||
EntityPlayer entityplayer = (EntityPlayer) this.players.get(i);
|
||||
|
||||
+ // CraftBukkit start - Test if player receiving packet can see the source of the packet
|
||||
+ if (entityhuman != null && entityhuman instanceof EntityPlayer && !entityplayer.getBukkitEntity().canSee(((EntityPlayer) entityhuman).getBukkitEntity())) {
|
||||
+ if (entityhuman != null && !entityplayer.getBukkitEntity().canSee(entityhuman.getBukkitEntity())) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
||||
Reference in New Issue
Block a user