Merge branch 'master' of ssh://dev.mineplex.com:7999/min/Mineplex

This commit is contained in:
Jonathan Williams 2013-10-26 11:01:22 -05:00
commit 7d8e79a234

View File

@ -86,6 +86,7 @@ public class PaintballGun extends ItemGadget
public void Paint(ProjectileHitEvent event)
{
Location loc = event.getEntity().getLocation().add(event.getEntity().getVelocity());
loc.getWorld().playEffect(loc, Effect.STEP_SOUND, 49);
byte color = 2;
double r = Math.random();
@ -94,6 +95,12 @@ public class PaintballGun extends ItemGadget
else if (r > 0.4) color = 9;
else if (r > 0.2) color = 14;
for (Block block : UtilBlock.getInRadius(loc, 3d).keySet())
{
if (block.getType() == Material.PORTAL)
return;
}
for (Block block : UtilBlock.getInRadius(loc, 1.5d).keySet())
{
if (!UtilBlock.solid(block))
@ -101,8 +108,6 @@ public class PaintballGun extends ItemGadget
Manager.Manager.GetBlockRestore().Add(block, 35, color, 4000);
}
loc.getWorld().playEffect(loc, Effect.STEP_SOUND, 49);
}
@EventHandler