Class WorldUtils
java.lang.Object
io.github.sefiraat.slimetinker.utils.WorldUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic voiddropItem(org.bukkit.inventory.ItemStack i, org.bukkit.block.Block b) static voiddropItem(org.bukkit.inventory.ItemStack i, org.bukkit.entity.Player p) static voiddropItem(org.bukkit.inventory.ItemStack i, org.bukkit.Location l) static voiddropItem(org.bukkit.World w, org.bukkit.Location l, org.bukkit.inventory.ItemStack i) static org.bukkit.LocationgetMid(org.bukkit.World world, double x1, double y1, double z1, double x2, double y2, double z2) static org.bukkit.block.BlockgetRandomBlockInRange(org.bukkit.block.Block b, int boundX, int boundY, int boundZ, boolean allowAir) Scans the given bounds range around the given location for a random block If allowAir is false then will try max 50 times then return nullstatic org.bukkit.block.BlockgetRandomBlockInRange(org.bukkit.entity.Player p, int boundX, int boundY, int boundZ, boolean allowAir) Scans the given bounds range around the given location for a random block If allowAir is false then will try max 50 times then return nullstatic org.bukkit.block.BlockgetRandomBlockInRange(org.bukkit.Location l, int boundX, int boundY, int boundZ, boolean allowAir) Scans the given bounds range around the given location for a random block If allowAir is false then will try max 50 times then return nullstatic org.bukkit.LocationgetRandomLocationInRange(org.bukkit.block.Block b, int boundX, int boundY, int boundZ) Scans the given bounds range around the given location for a random locationstatic org.bukkit.LocationgetRandomLocationInRange(org.bukkit.entity.Entity e, int boundX, int boundY, int boundZ) Scans the given bounds range around the given location for a random locationstatic org.bukkit.LocationgetRandomLocationInRange(org.bukkit.Location l, int boundX, int boundY, int boundZ) Scans the given bounds range around the given location for a random location
-
Method Details
-
dropItem
public static void dropItem(org.bukkit.inventory.ItemStack i, @Nonnull org.bukkit.entity.Player p) -
dropItem
public static void dropItem(org.bukkit.inventory.ItemStack i, @Nonnull org.bukkit.Location l) -
dropItem
public static void dropItem(org.bukkit.inventory.ItemStack i, @Nonnull org.bukkit.block.Block b) -
dropItem
public static void dropItem(@Nonnull org.bukkit.World w, org.bukkit.Location l, org.bukkit.inventory.ItemStack i) -
getMid
@Nonnull public static org.bukkit.Location getMid(@Nonnull org.bukkit.World world, double x1, double y1, double z1, double x2, double y2, double z2) -
getRandomBlockInRange
@Nullable public static org.bukkit.block.Block getRandomBlockInRange(@Nonnull org.bukkit.Location l, int boundX, int boundY, int boundZ, boolean allowAir) Scans the given bounds range around the given location for a random block If allowAir is false then will try max 50 times then return null- Parameters:
l-Locationto start looking fromboundX- The maximum distance on the X axisboundY- The maximum distance on the Y axisboundZ- The maximum distance on the Z axis- Returns:
- The found, random,
Block
-
getRandomBlockInRange
@Nullable public static org.bukkit.block.Block getRandomBlockInRange(@Nonnull org.bukkit.entity.Player p, int boundX, int boundY, int boundZ, boolean allowAir) Scans the given bounds range around the given location for a random block If allowAir is false then will try max 50 times then return null- Parameters:
p-Playerto start looking fromboundX- The maximum distance on the X axisboundY- The maximum distance on the Y axisboundZ- The maximum distance on the Z axis- Returns:
- The found, random,
Block
-
getRandomBlockInRange
@Nullable public static org.bukkit.block.Block getRandomBlockInRange(@Nonnull org.bukkit.block.Block b, int boundX, int boundY, int boundZ, boolean allowAir) Scans the given bounds range around the given location for a random block If allowAir is false then will try max 50 times then return null- Parameters:
b-Blockto start looking fromboundX- The maximum distance on the X axisboundY- The maximum distance on the Y axisboundZ- The maximum distance on the Z axis- Returns:
- The found, random,
Block
-
getRandomLocationInRange
@Nonnull public static org.bukkit.Location getRandomLocationInRange(@Nonnull org.bukkit.block.Block b, int boundX, int boundY, int boundZ) Scans the given bounds range around the given location for a random location- Parameters:
b-Blockto start looking fromboundX- The maximum distance on the X axisboundY- The maximum distance on the Y axisboundZ- The maximum distance on the Z axis- Returns:
- The found, random,
Location
-
getRandomLocationInRange
@Nonnull public static org.bukkit.Location getRandomLocationInRange(@Nonnull org.bukkit.entity.Entity e, int boundX, int boundY, int boundZ) Scans the given bounds range around the given location for a random location- Parameters:
e-Entityto start looking fromboundX- The maximum distance on the X axisboundY- The maximum distance on the Y axisboundZ- The maximum distance on the Z axis- Returns:
- The found, random,
Location
-
getRandomLocationInRange
@Nonnull public static org.bukkit.Location getRandomLocationInRange(@Nonnull org.bukkit.Location l, int boundX, int boundY, int boundZ) Scans the given bounds range around the given location for a random location- Parameters:
l-Locationto start looking fromboundX- The maximum distance on the X axisboundY- The maximum distance on the Y axisboundZ- The maximum distance on the Z axis- Returns:
- The found, random,
Location
-