Package com.andrei1058.bedwars.api.util
Class BlockRay
java.lang.Object
com.andrei1058.bedwars.api.util.BlockRay
- All Implemented Interfaces:
Iterator<org.bukkit.block.Block>
-
Constructor Summary
ConstructorsConstructorDescriptionBlockRay(org.bukkit.World world, org.bukkit.util.Vector src, org.bukkit.util.Vector dst, double step) Constructs a BlockRay instance. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
BlockRay
public BlockRay(org.bukkit.World world, org.bukkit.util.Vector src, org.bukkit.util.Vector dst, double step) Constructs a BlockRay instance.- Parameters:
world- bukkit world to get the blocks from.src- the source vector (where we shoot the ray).dst- the destination vector.step- how frequent to check the ray (0.25 - 0.5 recommended).
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
public org.bukkit.block.Block next()This could return similar blocks multiple times.
-