public class PlayerUtils
extends java.lang.Object
| Constructor and Description |
|---|
PlayerUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addItemToInventory(org.bukkit.entity.Player player,
org.bukkit.inventory.ItemStack itemstack)
Add a item to a player's inventory
|
static void |
addPotionEffect(org.bukkit.entity.Player player,
org.bukkit.potion.PotionEffectType potioneffect,
int time,
int level)
Add potion effect
|
static void |
burn(org.bukkit.entity.Player player,
int ticks)
Burn a player
|
static void |
clearInventory(org.bukkit.entity.Player player)
Clear inventory
|
static void |
damage(org.bukkit.entity.Player player,
double damage)
Damage a Player
|
static void |
extinguish(org.bukkit.entity.Player player)
extinguish a player
|
static void |
feed(org.bukkit.entity.Player player)
Feed a Player
|
static void |
feed(org.bukkit.entity.Player player,
int value)
Feed a Player
|
static org.bukkit.inventory.Inventory |
getInventory(org.bukkit.entity.Player player)
Get a player's inventory
|
java.lang.String |
getInventoryName(org.bukkit.entity.Player player)
Get inventory name
|
java.lang.String |
getInventoryTitle(org.bukkit.entity.Player player)
Get inventory title
|
static java.lang.Integer |
getLevel(org.bukkit.entity.Player player)
Get player's level
|
static java.lang.Integer |
getPing(org.bukkit.entity.Player player)
Get player's ping
|
static java.util.UUID |
getUUID(org.bukkit.entity.Player player)
Get a UUID
|
static void |
heal(org.bukkit.entity.Player player)
Heal a Player
|
static void |
heal(org.bukkit.entity.Player player,
double value)
Heal a Player
|
static java.lang.Boolean |
inventoryContain(org.bukkit.entity.Player player,
org.bukkit.Material material)
Check inventory for definied item
|
static java.lang.Boolean |
inventoryContain(org.bukkit.entity.Player player,
org.bukkit.Material material,
int amount)
Check inventory for definied item with amount
|
java.lang.Boolean |
inventoryHasEmptySlot(org.bukkit.entity.Player player)
Check inventory for empty slot
|
static java.lang.Boolean |
isSneaking(org.bukkit.entity.Player player)
Check if player is sneaking
|
static java.lang.Boolean |
isSprinting(org.bukkit.entity.Player player)
Check if player is sprinting
|
static void |
kick(org.bukkit.entity.Player player,
java.lang.String message)
Kick potion effect
|
static void |
kill(org.bukkit.entity.Player player)
Kill a Player
|
static void |
removeAllPotionEffect(org.bukkit.entity.Player player)
Remove all potion effect
|
static void |
removePotionEffect(org.bukkit.entity.Player player,
org.bukkit.potion.PotionEffectType potioneffect)
Remove potion effect
|
static void |
setGamemode(org.bukkit.entity.Player player,
org.bukkit.GameMode gamemode)
Change player's gamemode
|
static void |
setLevel(org.bukkit.entity.Player player,
int value)
Set player's level
|
static void |
setVelocity(org.bukkit.entity.Player player,
double x,
double y,
double z)
Set a player velocity
|
static void |
shootBlock(org.bukkit.entity.Player player,
org.bukkit.Material material,
byte data,
double velocity)
Shoot block
|
static void |
shootItem(org.bukkit.entity.Player player,
org.bukkit.Material material,
double velocity)
Shoot item
|
static void |
shootItemAndRemove(org.bukkit.entity.Player player,
org.bukkit.Material material,
double velocity,
long ticks)
Shoot item and remove it
|
static void |
starve(org.bukkit.entity.Player player)
Starve a player
|
static void |
starve(org.bukkit.entity.Player player,
int value)
Starve a player
|
static void |
teleport(org.bukkit.entity.Player player,
java.lang.Object object)
Teleport a player
|
static void |
unlockAward(org.bukkit.entity.Player player,
org.bukkit.Achievement achievement)
Unlock player sucess
|
public static void kill(org.bukkit.entity.Player player)
player - public static void damage(org.bukkit.entity.Player player,
double damage)
player - damage - public static void heal(org.bukkit.entity.Player player)
player - public static void heal(org.bukkit.entity.Player player,
double value)
player - value - public static void feed(org.bukkit.entity.Player player)
player - public static void feed(org.bukkit.entity.Player player,
int value)
player - value - public static void starve(org.bukkit.entity.Player player)
player - public static void starve(org.bukkit.entity.Player player,
int value)
player - value - public static java.util.UUID getUUID(org.bukkit.entity.Player player)
player - public static void setGamemode(org.bukkit.entity.Player player,
org.bukkit.GameMode gamemode)
player - gamemode - public static void addPotionEffect(org.bukkit.entity.Player player,
org.bukkit.potion.PotionEffectType potioneffect,
int time,
int level)
player - potioneffect - time - level - public static void removePotionEffect(org.bukkit.entity.Player player,
org.bukkit.potion.PotionEffectType potioneffect)
player - potioneffect - public static void removeAllPotionEffect(org.bukkit.entity.Player player)
player - public static void kick(org.bukkit.entity.Player player,
java.lang.String message)
player - message - public static void teleport(org.bukkit.entity.Player player,
java.lang.Object object)
player - object - public static void burn(org.bukkit.entity.Player player,
int ticks)
player - ticks - public static void extinguish(org.bukkit.entity.Player player)
player - ticks - public static void unlockAward(org.bukkit.entity.Player player,
org.bukkit.Achievement achievement)
player - award - public static org.bukkit.inventory.Inventory getInventory(org.bukkit.entity.Player player)
player - public static void addItemToInventory(org.bukkit.entity.Player player,
org.bukkit.inventory.ItemStack itemstack)
player - itemstack - public static java.lang.Boolean inventoryContain(org.bukkit.entity.Player player,
org.bukkit.Material material)
inventory - material - public static java.lang.Boolean inventoryContain(org.bukkit.entity.Player player,
org.bukkit.Material material,
int amount)
inventory - material - amount - public java.lang.String getInventoryName(org.bukkit.entity.Player player)
player - public java.lang.String getInventoryTitle(org.bukkit.entity.Player player)
player - public java.lang.Boolean inventoryHasEmptySlot(org.bukkit.entity.Player player)
inventory - material - public static void clearInventory(org.bukkit.entity.Player player)
player - public static java.lang.Integer getLevel(org.bukkit.entity.Player player)
player - public static void setLevel(org.bukkit.entity.Player player,
int value)
player - value - public static void shootBlock(org.bukkit.entity.Player player,
org.bukkit.Material material,
byte data,
double velocity)
player - material - data - velocity - public static void shootItem(org.bukkit.entity.Player player,
org.bukkit.Material material,
double velocity)
player - material - velocity - public static void shootItemAndRemove(org.bukkit.entity.Player player,
org.bukkit.Material material,
double velocity,
long ticks)
player - material - velocity - public static void setVelocity(org.bukkit.entity.Player player,
double x,
double y,
double z)
player - x - y - z - public static java.lang.Integer getPing(org.bukkit.entity.Player player)
public static java.lang.Boolean isSprinting(org.bukkit.entity.Player player)
player - public static java.lang.Boolean isSneaking(org.bukkit.entity.Player player)
player -