Add hideEntity / showEntity API

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-11-29 09:18:52 +11:00
parent 4e0070d822
commit 95ab0e27a8
4 changed files with 58 additions and 40 deletions

View File

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