Class WorldUtils

java.lang.Object
io.github.sefiraat.slimetinker.utils.WorldUtils

public final class WorldUtils extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    dropItem(org.bukkit.inventory.ItemStack i, org.bukkit.block.Block b)
     
    static void
    dropItem(org.bukkit.inventory.ItemStack i, org.bukkit.entity.Player p)
     
    static void
    dropItem(org.bukkit.inventory.ItemStack i, org.bukkit.Location l)
     
    static void
    dropItem(org.bukkit.World w, org.bukkit.Location l, org.bukkit.inventory.ItemStack i)
     
    static org.bukkit.Location
    getMid(org.bukkit.World world, double x1, double y1, double z1, double x2, double y2, double z2)
     
    static org.bukkit.block.Block
    getRandomBlockInRange(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
    static org.bukkit.block.Block
    getRandomBlockInRange(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
    static org.bukkit.block.Block
    getRandomBlockInRange(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
    static org.bukkit.Location
    getRandomLocationInRange(org.bukkit.block.Block b, int boundX, int boundY, int boundZ)
    Scans the given bounds range around the given location for a random location
    static org.bukkit.Location
    getRandomLocationInRange(org.bukkit.entity.Entity e, int boundX, int boundY, int boundZ)
    Scans the given bounds range around the given location for a random location
    static org.bukkit.Location
    getRandomLocationInRange(org.bukkit.Location l, int boundX, int boundY, int boundZ)
    Scans the given bounds range around the given location for a random location

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 - Location to start looking from
      boundX - The maximum distance on the X axis
      boundY - The maximum distance on the Y axis
      boundZ - 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 - Player to start looking from
      boundX - The maximum distance on the X axis
      boundY - The maximum distance on the Y axis
      boundZ - 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 - Block to start looking from
      boundX - The maximum distance on the X axis
      boundY - The maximum distance on the Y axis
      boundZ - 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 - Block to start looking from
      boundX - The maximum distance on the X axis
      boundY - The maximum distance on the Y axis
      boundZ - 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 - Entity to start looking from
      boundX - The maximum distance on the X axis
      boundY - The maximum distance on the Y axis
      boundZ - 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 - Location to start looking from
      boundX - The maximum distance on the X axis
      boundY - The maximum distance on the Y axis
      boundZ - The maximum distance on the Z axis
      Returns:
      The found, random, Location