Fix Treasure painball gun issue, fix parkour paintbull gun issue
This commit is contained in:
parent
d0edde9dbd
commit
ed85779876
@ -39,4 +39,10 @@ public class BlockInfo
|
||||
{
|
||||
return _block.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj)
|
||||
{
|
||||
return _block.equals(obj);
|
||||
}
|
||||
}
|
||||
|
@ -388,17 +388,21 @@ public class Treasure
|
||||
|
||||
public boolean containsBlock(Block block)
|
||||
{
|
||||
if (_wallsBlockInfo.contains(block))
|
||||
return true;
|
||||
for (BlockInfo blockInfo : _wallsBlockInfo)
|
||||
if (blockInfo.equals(block))
|
||||
return true;
|
||||
|
||||
if (_outerRingBlockInfo.contains(block))
|
||||
return true;
|
||||
for (BlockInfo blockInfo : _outerRingBlockInfo)
|
||||
if (blockInfo.equals(block))
|
||||
return true;
|
||||
|
||||
if (_centerBlockInfo.contains(block))
|
||||
return true;
|
||||
for (BlockInfo blockInfo : _centerBlockInfo)
|
||||
if (blockInfo.equals(block))
|
||||
return true;
|
||||
|
||||
if (_chestBlockInfo.contains(block))
|
||||
return true;
|
||||
for (BlockInfo blockInfo : _chestBlockInfo)
|
||||
if (blockInfo.equals(block))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -28,11 +28,11 @@ import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilEvent;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.donation.DonationManager;
|
||||
import mineplex.core.gadget.event.GadgetActivateEvent;
|
||||
import mineplex.core.gadget.event.GadgetBlockEvent;
|
||||
@ -400,14 +400,15 @@ public class ParkourManager extends MiniPlugin
|
||||
{
|
||||
for (Iterator<Block> iterator = event.getBlocks().iterator(); iterator.hasNext();)
|
||||
{
|
||||
Location location = iterator.next().getLocation();
|
||||
for (ParkourData data : _parkour)
|
||||
{
|
||||
if (data.InBoundary(iterator.next().getLocation()))
|
||||
if (data.InBoundary(location))
|
||||
{
|
||||
iterator.remove();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ public class PollManager extends MiniClientPlugin<PlayerPollData>
|
||||
if (event.getType() != UpdateType.SLOW)
|
||||
return;
|
||||
|
||||
if (_polls.size() == 0)
|
||||
if (_polls == null || _polls.size() == 0)
|
||||
return;
|
||||
|
||||
for (Player player : _plugin.getServer().getOnlinePlayers())
|
||||
|
Loading…
Reference in New Issue
Block a user