Class BukkitUtil

java.lang.Object
com.sk89q.worldguard.bukkit.BukkitUtil

public class BukkitUtil extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static com.sk89q.worldguard.blacklist.target.Target
    createTarget(org.bukkit.block.Block block)
    Get a blacklist target for the given block.
    static com.sk89q.worldguard.blacklist.target.Target
    createTarget(org.bukkit.inventory.ItemStack item)
    Get a blacklist target for the given item.
    static com.sk89q.worldguard.blacklist.target.Target
    createTarget(org.bukkit.Material material)
    Get a blacklist target for the given material.
    static int
    getPotionEffectBits(org.bukkit.inventory.ItemStack item)
    Get just the potion effect bits.
    static boolean
    isWaterPotion(org.bukkit.inventory.ItemStack item)
    Checks if the given potion is a vial of water.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • isWaterPotion

      public static boolean isWaterPotion(org.bukkit.inventory.ItemStack item)
      Checks if the given potion is a vial of water.
      Parameters:
      item - the item to check
      Returns:
      true if it's a water vial
    • getPotionEffectBits

      public static int getPotionEffectBits(org.bukkit.inventory.ItemStack item)
      Get just the potion effect bits. This is to work around bugs with potion parsing.
      Parameters:
      item - item
      Returns:
      new bits
    • createTarget

      public static com.sk89q.worldguard.blacklist.target.Target createTarget(org.bukkit.block.Block block)
      Get a blacklist target for the given block.
      Parameters:
      block - the block
      Returns:
      a target
    • createTarget

      public static com.sk89q.worldguard.blacklist.target.Target createTarget(org.bukkit.inventory.ItemStack item)
      Get a blacklist target for the given item.
      Parameters:
      item - the item
      Returns:
      a target
    • createTarget

      public static com.sk89q.worldguard.blacklist.target.Target createTarget(org.bukkit.Material material)
      Get a blacklist target for the given material.
      Parameters:
      material - the material
      Returns:
      a target