public class BukkitUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static Target |
createTarget(org.bukkit.block.Block block)
Get a blacklist target for the given block.
|
static Target |
createTarget(org.bukkit.block.Block block,
org.bukkit.Material material)
Get a blacklist target for the given block.
|
static Target |
createTarget(org.bukkit.inventory.ItemStack item)
Get a blacklist target for the given item.
|
static Target |
createTarget(org.bukkit.Material material)
Get a blacklist target for the given material.
|
static void |
dropSign(org.bukkit.block.Block block)
Deprecated.
see
Block.breakNaturally() |
static void |
findFreePosition(org.bukkit.entity.Player player)
Find a position for the player to stand that is not inside a block.
|
static Collection<? extends org.bukkit.entity.Player> |
getOnlinePlayers()
Get a collection of the currently online players.
|
static int |
getPotionEffectBits(org.bukkit.inventory.ItemStack item)
Get just the potion effect bits.
|
static boolean |
isBlockWater(org.bukkit.World world,
int ox,
int oy,
int oz)
Checks if the given block is water
|
static boolean |
isIntensiveEntity(org.bukkit.entity.Entity entity)
Returns whether an entity should be removed for the halt activity mode.
|
static boolean |
isWaterPotion(org.bukkit.inventory.ItemStack item)
Checks if the given potion is a vial of water.
|
static org.bukkit.entity.Player |
matchSinglePlayer(org.bukkit.Server server,
String name)
|
static String |
replaceColorMacros(String str)
Replace color macros in a string.
|
static void |
setBlockToWater(org.bukkit.World world,
int ox,
int oy,
int oz)
Sets the given block to fluid water.
|
static org.bukkit.Location |
toLocation(org.bukkit.World world,
com.sk89q.worldedit.Vector vec)
Converts a WorldEdit vector to a Bukkit location.
|
static ProtectedRegion |
toRegion(org.bukkit.Chunk chunk)
Create a dummy region that encompasses the size of a chunk.
|
static com.sk89q.worldedit.BlockVector |
toVector(org.bukkit.block.Block block)
Converts the location of a Bukkit block to a WorldEdit vector.
|
static com.sk89q.worldedit.Vector |
toVector(org.bukkit.Location loc)
Converts a Bukkit location to a WorldEdit vector.
|
static com.sk89q.worldedit.Vector |
toVector(org.bukkit.util.Vector vector)
Converts a Bukkit vector to a WorldEdit vector.
|
static <T extends Enum<T>> |
tryEnum(Class<T> enumType,
String... values)
Deprecated.
|
public static com.sk89q.worldedit.BlockVector toVector(org.bukkit.block.Block block)
block - The block to convertpublic static com.sk89q.worldedit.Vector toVector(org.bukkit.Location loc)
loc - A Bukkit Locationpublic static com.sk89q.worldedit.Vector toVector(org.bukkit.util.Vector vector)
vector - The Bukkit vectorpublic static org.bukkit.Location toLocation(org.bukkit.World world,
com.sk89q.worldedit.Vector vec)
world - The World to create the new Location withvec - The vector to use for coordinatespublic static ProtectedRegion toRegion(org.bukkit.Chunk chunk)
chunk - The chunk@Deprecated public static org.bukkit.entity.Player matchSinglePlayer(org.bukkit.Server server, String name)
server - The server to checkname - The name to attempt to match@Deprecated public static void dropSign(org.bukkit.block.Block block)
Block.breakNaturally()block - The blockpublic static void setBlockToWater(org.bukkit.World world,
int ox,
int oy,
int oz)
world - ox - oy - oz - public static boolean isBlockWater(org.bukkit.World world,
int ox,
int oy,
int oz)
world - the worldox - xoy - yoz - zpublic static boolean isWaterPotion(org.bukkit.inventory.ItemStack item)
item - the item to checkpublic static int getPotionEffectBits(org.bukkit.inventory.ItemStack item)
item - itempublic static void findFreePosition(org.bukkit.entity.Player player)
player - public static String replaceColorMacros(String str)
str - public static boolean isIntensiveEntity(org.bukkit.entity.Entity entity)
entity - @Deprecated public static <T extends Enum<T>> T tryEnum(Class<T> enumType, String... values)
Enums.findByValue(Class, String...)enumType - enum classvalues - values to testpublic static Target createTarget(org.bukkit.block.Block block)
block - the blockpublic static Target createTarget(org.bukkit.block.Block block, org.bukkit.Material material)
block - the blockmaterial - a fallback materialpublic static Target createTarget(org.bukkit.inventory.ItemStack item)
item - the itempublic static Target createTarget(org.bukkit.Material material)
material - the materialpublic static Collection<? extends org.bukkit.entity.Player> getOnlinePlayers()
Copyright © 2015. All Rights Reserved.