Fixed bug where spectators could trigger anti-cheat in bridges

This commit is contained in:
Chiss 2014-08-27 15:16:20 +10:00
parent d9ef5f50be
commit 9439daa852
2 changed files with 7 additions and 1 deletions

View File

@ -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();

View File

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