Fix spectators being able to interact with hero selection
This commit is contained in:
parent
bfba119f3f
commit
59af31c6f8
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user