Set noclip for spectator NPCs

This commit is contained in:
fullwall 2017-06-09 20:27:44 +08:00
parent 4235e72cc1
commit c02fec9ca0
4 changed files with 4 additions and 0 deletions

View File

@ -297,6 +297,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
if (updateCounter + 1 > Setting.PACKET_UPDATE_DELAY.asInt()) {
updateEffects = true;
}
this.noclip = isSpectator();
Bukkit.getServer().getPluginManager().unsubscribeFromPermission("bukkit.broadcast.user", bukkitEntity);
livingEntityBaseTick();

View File

@ -147,6 +147,7 @@ public class WitherController extends MobEntityController {
protected void M() {
if (npc == null) {
super.M();
return;
}
npc.update();
}

View File

@ -111,6 +111,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
super.A_();
if (npc == null)
return;
this.noclip = isSpectator();
if (updateCounter + 1 > Setting.PACKET_UPDATE_DELAY.asInt()) {
updateEffects = true;
}

View File

@ -120,6 +120,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
super.B_();
if (npc == null)
return;
this.noclip = isSpectator();
if (updateCounter + 1 > Setting.PACKET_UPDATE_DELAY.asInt()) {
updateEffects = true;
}