Ninja Dash stopping/not working on rails
This commit is contained in:
parent
71f9fd97d6
commit
4085453f0f
@ -3,6 +3,7 @@ package nautilus.game.arcade.kit.perks;
|
|||||||
import org.bukkit.Color;
|
import org.bukkit.Color;
|
||||||
import org.bukkit.FireworkEffect.Type;
|
import org.bukkit.FireworkEffect.Type;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.Material;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
@ -86,9 +87,12 @@ public class PerkDash extends Perk
|
|||||||
Location newTarget = player.getLocation().add(new Vector(0, 0.2, 0)).add(player.getLocation().getDirection().multiply(curRange));
|
Location newTarget = player.getLocation().add(new Vector(0, 0.2, 0)).add(player.getLocation().getDirection().multiply(curRange));
|
||||||
|
|
||||||
if (!UtilBlock.airFoliage(newTarget.getBlock()) || !UtilBlock.airFoliage(newTarget.getBlock().getRelative(BlockFace.UP)))
|
if (!UtilBlock.airFoliage(newTarget.getBlock()) || !UtilBlock.airFoliage(newTarget.getBlock().getRelative(BlockFace.UP)))
|
||||||
|
{
|
||||||
|
if (newTarget.getBlock().getType() != Material.RAILS)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Progress Forwards
|
// Progress Forwards
|
||||||
curRange += 0.2;
|
curRange += 0.2;
|
||||||
|
Loading…
Reference in New Issue
Block a user