public class PacketPlayer
extends java.lang.Object
Player
entity.| Constructor and Description |
|---|
PacketPlayer(org.bukkit.entity.Player player)
Creates a fake player copy of target player.
|
PacketPlayer(java.lang.String name,
org.bukkit.Location location,
int itemInHand)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPotionColor(org.bukkit.Color color)
Adds potion effect with color to this fake entity.
|
void |
addPotionColor(int color)
Adds potion effect with color to this fake entity.
|
void |
block()
Deprecated.
Does not always work.
|
void |
damage()
Plays damage animation for this fake player entity.
|
static void |
destroyAll()
Sends
PacketPlayOutEntityDestroy to all online players for every
spawned and not destroyed fake player entity. |
void |
eatInHand()
Deprecated.
Does not always work.
|
org.bukkit.Location |
getLocation()
Gets location of this fake player entity.
|
double |
getLocationX()
Gets X axis location of this fake player entity.
|
double |
getLocationY()
Gets Y axis location of this fake player entity.
|
double |
getLocationZ()
Gets Z axis location of this fake player entity.
|
java.lang.String |
getName()
Gets name of this fake player entity.
|
org.bukkit.World |
getWorld()
Gets world this fake entity is in.
|
void |
hideForPlayer(org.bukkit.entity.Player player)
Hides this fake player entity from target player.
|
void |
remove()
Destroys this fake entity.
|
void |
reset()
Resets metadata setting for this fake player entity.
|
void |
rotateHead(float yaw)
Sets yaw head rotation for this fake player.
|
void |
sendtoplayer(org.bukkit.entity.Player player)
Sends this fake player entity spawn packet to target player.
|
void |
setCrouched()
Sets 'crouched' metadata for this fake player entity.
|
void |
setInvisible()
Sets invisibility metadata for this fake player entity.
|
void |
setName(java.lang.String name)
Deprecated.
May disconnect the actual player with the same name.
|
void |
setYawAndPitch(float yaw,
float pitch)
Sets yaw and pitch this fake entity is looking in.
|
void |
showForPlayer(org.bukkit.entity.Player player)
Shows this fake entity to target player.
|
void |
sleep()
Sets sleeping animation for this fake player entity.
|
void |
sprint()
Sets 'sprint' data for this fake player entity.
|
void |
swingArm()
Plays 'swing arm' animation for this fake player entity.
|
void |
teleport(org.bukkit.Location loc)
Teleports this fake player to target location.
|
void |
updateItems(org.bukkit.inventory.ItemStack hand,
org.bukkit.inventory.ItemStack helmet,
org.bukkit.inventory.ItemStack chestplate,
org.bukkit.inventory.ItemStack leggings,
org.bukkit.inventory.ItemStack boots)
Updates this fake entity armor and hand held item.
|
void |
walk(double x,
double y,
double z)
Sends walk packet for this entity.
|
void |
walk(double x,
double y,
double z,
float yaw,
float pitch)
Sends walk packet for this entity with yaw and pitch settings.
|
@Deprecated
public PacketPlayer(java.lang.String name,
org.bukkit.Location location,
int itemInHand)
name - name of player entityid - global id of entitylocation - location of fake entityitemInHand - item slotpublic PacketPlayer(org.bukkit.entity.Player player)
player - player to copypublic void setYawAndPitch(float yaw,
float pitch)
yaw - yaw settingpitch - pitch settingpublic void rotateHead(float yaw)
yaw - yaw settingpublic void teleport(org.bukkit.Location loc)
loc - target locationpublic void remove()
public void updateItems(org.bukkit.inventory.ItemStack hand,
org.bukkit.inventory.ItemStack helmet,
org.bukkit.inventory.ItemStack chestplate,
org.bukkit.inventory.ItemStack leggings,
org.bukkit.inventory.ItemStack boots)
hand - hand held itemhelmet - helmet itemstackchestplate - chestplate itemstackleggings - leggings itemstackboots - boots itemstack@Deprecated public final void setName(java.lang.String name)
name - new name to set topublic final java.lang.String getName()
public void hideForPlayer(org.bukkit.entity.Player player)
player - target playerpublic void showForPlayer(org.bukkit.entity.Player player)
player - target playerpublic void addPotionColor(org.bukkit.Color color)
color - Bukkit colorpublic void addPotionColor(int color)
color - integer colorpublic void walk(double x,
double y,
double z)
x - blocks to move on X axisy - blocks to move on Y axisz - blocks to move on Z axispublic void walk(double x,
double y,
double z,
float yaw,
float pitch)
x - blocks to move on X axisy - blocks to move on Y axisz - blocks to move on Z axisyaw - yaw settingpitch - pitch settingpublic void sendtoplayer(org.bukkit.entity.Player player)
player - target playerpublic void setInvisible()
public void setCrouched()
public void reset()
public void sprint()
@Deprecated public void block()
public void damage()
public void swingArm()
@Deprecated public void eatInHand()
public void sleep()
public final double getLocationX()
public final double getLocationY()
public final double getLocationZ()
public final org.bukkit.World getWorld()
public final org.bukkit.Location getLocation()
public static final void destroyAll()
PacketPlayOutEntityDestroy to all online players for every
spawned and not destroyed fake player entity.