Fixed bug where spectators could trigger anti-cheat in bridges
This commit is contained in:
parent
d9ef5f50be
commit
9439daa852
@ -130,7 +130,7 @@ public class MorphBlock extends MorphGadget
|
||||
{
|
||||
FallingBlock block = blockIterator.next();
|
||||
|
||||
if (!block.isValid())
|
||||
if (!block.isValid() || block.getVehicle() == null)
|
||||
{
|
||||
block.remove();
|
||||
blockIterator.remove();
|
||||
|
@ -1362,6 +1362,9 @@ public class Bridge extends TeamGame implements OreObsfucation
|
||||
if (event.getBlock().getType() != Material.CHEST)
|
||||
return;
|
||||
|
||||
if (!IsAlive(event.getPlayer()))
|
||||
return;
|
||||
|
||||
for (Location loc : WorldData.GetCustomLocs("54"))
|
||||
{
|
||||
if (loc.getBlock().equals(event.getBlock()))
|
||||
@ -1385,6 +1388,9 @@ public class Bridge extends TeamGame implements OreObsfucation
|
||||
if (event.getClickedBlock().getType() != Material.CHEST)
|
||||
return;
|
||||
|
||||
if (!IsAlive(event.getPlayer()))
|
||||
return;
|
||||
|
||||
for (Location loc : WorldData.GetCustomLocs("54"))
|
||||
{
|
||||
if (loc.getBlock().equals(event.getClickedBlock()))
|
||||
|
Loading…
Reference in New Issue
Block a user