Fix spectators being able to interact with hero selection

This commit is contained in:
Sam 2017-07-13 00:18:45 +01:00
parent bfba119f3f
commit 59af31c6f8
1 changed files with 6 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilParticle;
import mineplex.core.common.util.UtilParticle.ParticleType;
import mineplex.core.common.util.UtilParticle.ViewDist;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilServer;
import mineplex.core.common.util.UtilTextMiddle;
import mineplex.core.itemstack.ItemBuilder;
@ -193,6 +194,11 @@ public class PrepareSelection implements Listener, IPacketHandler
Player player = packetInfo.getPlayer();
int entityId = packet.a;
if (UtilPlayer.isSpectator(player))
{
return;
}
ClientArmorStand goBackStand = _goBackStands.get(player);
if (goBackStand != null && goBackStand.getEntityId() == entityId)