public class BukkitPlayer extends LocalPlayer
| Constructor and Description |
|---|
BukkitPlayer(WorldEditPlugin plugin,
ServerInterface server,
org.bukkit.entity.Player player) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispatchCUIEvent(CUIEvent event)
Send a CUI event.
|
void |
floatAt(int x,
int y,
int z,
boolean alwaysGlass)
Make the player float in the given blocks.
|
BaseBlock |
getBlockInHand()
Get the Block that the player is holding.
|
<T> T |
getFacet(Class<? extends T> cls)
Get the facet corresponding to the given class or interface.
|
String[] |
getGroups()
Get a list of groups that this subject is a part of.
|
BlockBag |
getInventoryBlockBag()
Get this actor's block bag.
|
int |
getItemInHand()
Get the ID of the item that the player is holding.
|
Location |
getLocation()
Get the location of this entity.
|
String |
getName()
Get the name of the actor.
|
double |
getPitch()
Get the player's view pitch in degrees.
|
org.bukkit.entity.Player |
getPlayer() |
WorldVector |
getPosition()
Get the actor's position.
|
SessionKey |
getSessionKey()
Get an object describing this session.
|
BaseEntity |
getState()
Get a copy of the entity's state.
|
UUID |
getUniqueId()
Get the UUID for this object.
|
LocalWorld |
getWorld()
Return the world that the player is on.
|
double |
getYaw()
Get the player's view yaw in degrees.
|
void |
giveItem(int type,
int amt)
Gives the player an item.
|
boolean |
hasCreativeMode()
Return whether this actor has creative mode.
|
boolean |
hasPermission(String perm)
Return whether this subject has the given permission.
|
void |
print(String msg)
Print a WorldEdit message.
|
void |
printDebug(String msg)
Print a WorldEdit message.
|
void |
printError(String msg)
Print a WorldEdit error.
|
void |
printRaw(String msg)
Print a message.
|
void |
setPosition(Vector pos,
float pitch,
float yaw)
Move the player.
|
ascendLevel, ascendToCeiling, ascendToCeiling, ascendUpwards, ascendUpwards, canDestroyBedrock, checkPermission, clone, descendLevel, equals, findFreePosition, findFreePosition, getBlockIn, getBlockOn, getBlockTrace, getBlockTrace, getBlockTraceFace, getCardinalDirection, getCardinalDirection, getExtent, getSolidBlockTrace, hashCode, isHoldingPickAxe, isPlayer, openFileOpenDialog, openFileSaveDialog, passThroughForwardWall, remove, setOnGround, setPositionpublic BukkitPlayer(WorldEditPlugin plugin, ServerInterface server, org.bukkit.entity.Player player)
public UUID getUniqueId()
Identifiablepublic int getItemInHand()
Playerpublic BaseBlock getBlockInHand() throws WorldEditException
PlayergetBlockInHand in interface PlayergetBlockInHand in class AbstractPlayerActorWorldEditExceptionpublic String getName()
Actorpublic WorldVector getPosition()
PlayerIf the actor has no permission, then a dummy location is returned.
public double getPitch()
Playerpublic double getYaw()
Playerpublic void giveItem(int type,
int amt)
Playertype - The item id of the item to be given to the playeramt - How many items in the stackpublic void printRaw(String msg)
Actormsg - The message textpublic void print(String msg)
Actormsg - The message textpublic void printDebug(String msg)
Actormsg - The message textpublic void printError(String msg)
Actormsg - The error message textpublic void setPosition(Vector pos, float pitch, float yaw)
Playerpos - where to move thempitch - the pitch (up/down) of the player's view in degreesyaw - the yaw (left/right) of the player's view in degreespublic String[] getGroups()
Subjectpublic BlockBag getInventoryBlockBag()
Playerpublic boolean hasPermission(String perm)
Subjectperm - the permissionpublic LocalWorld getWorld()
Playerpublic void dispatchCUIEvent(CUIEvent event)
ActordispatchCUIEvent in interface ActordispatchCUIEvent in class AbstractPlayerActorevent - the eventpublic org.bukkit.entity.Player getPlayer()
public boolean hasCreativeMode()
PlayerhasCreativeMode in interface PlayerhasCreativeMode in class AbstractPlayerActorpublic void floatAt(int x,
int y,
int z,
boolean alwaysGlass)
PlayerfloatAt in interface PlayerfloatAt in class AbstractPlayerActorx - The X coordinate of the block to float iny - The Y coordinate of the block to float inz - The Z coordinate of the block to float inpublic BaseEntity getState()
EntityIn some cases, this method may return null if a snapshot
of the entity can't be created. It may not be possible, for example,
to get a snapshot of a player.
public Location getLocation()
Entity@Nullable public <T> T getFacet(Class<? extends T> cls)
FacetedT - the typecls - the class or interfacenull if one is unavailablepublic SessionKey getSessionKey()
SessionOwnerCopyright © 2010-2014. All Rights Reserved.