public abstract class AbstractPlayerActor extends Object implements Actor, Player, Cloneable
| Constructor and Description |
|---|
AbstractPlayerActor() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
ascendLevel()
Go up one level to the next free space above.
|
boolean |
ascendToCeiling(int clearance)
Ascend to the ceiling above.
|
boolean |
ascendToCeiling(int clearance,
boolean alwaysGlass)
Ascend to the ceiling above.
|
boolean |
ascendUpwards(int distance)
Just go up.
|
boolean |
ascendUpwards(int distance,
boolean alwaysGlass)
Just go up.
|
boolean |
canDestroyBedrock()
Returns true if the actor can destroy bedrock.
|
void |
checkPermission(String permission)
Check whether this subject has been granted the given permission
and throw an exception on error.
|
Object |
clone() |
boolean |
descendLevel()
Go up one level to the next free space above.
|
void |
dispatchCUIEvent(CUIEvent event)
Send a CUI event.
|
boolean |
equals(Object other) |
void |
findFreePosition()
Find a position for the player to stand that is not inside a block.
|
void |
findFreePosition(WorldVector searchPos)
Find a position for the actor to stand that is not inside a block.
|
void |
floatAt(int x,
int y,
int z,
boolean alwaysGlass)
Make the player float in the given blocks.
|
WorldVector |
getBlockIn()
Get the point of the block that is being stood in.
|
BaseBlock |
getBlockInHand()
Get the Block that the player is holding.
|
WorldVector |
getBlockOn()
Get the point of the block that is being stood upon.
|
WorldVector |
getBlockTrace(int range)
Get the point of the block being looked at.
|
WorldVector |
getBlockTrace(int range,
boolean useLastBlock)
Get the point of the block being looked at.
|
WorldVectorFace |
getBlockTraceFace(int range,
boolean useLastBlock)
Get the face that the player is looking at.
|
PlayerDirection |
getCardinalDirection()
Get the player's cardinal direction (N, W, NW, etc.).
|
PlayerDirection |
getCardinalDirection(int yawOffset)
Get the player's cardinal direction (N, W, NW, etc.) with an offset.
|
Extent |
getExtent()
Get the extent that this entity is on.
|
WorldVector |
getSolidBlockTrace(int range)
Get the point of the block being looked at.
|
boolean |
hasCreativeMode()
Return whether this actor has creative mode.
|
int |
hashCode() |
boolean |
isHoldingPickAxe()
Returns true if the entity is holding a pick axe.
|
boolean |
isPlayer()
Return whether this actor is a player.
|
File |
openFileOpenDialog(String[] extensions)
Open a file open dialog.
|
File |
openFileSaveDialog(String[] extensions)
Open a file save dialog.
|
boolean |
passThroughForwardWall(int range)
Get the player's view yaw.
|
boolean |
remove()
Remove this entity from it container.
|
void |
setOnGround(WorldVector searchPos)
Set the actor on the ground.
|
void |
setPosition(Vector pos)
Move the player.
|
finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetInventoryBlockBag, getItemInHand, getPitch, getPosition, getWorld, getYaw, giveItem, setPositiongetLocation, getStategetName, print, printDebug, printError, printRawgetUniqueIdgetSessionKeypublic final Extent getExtent()
Entitypublic boolean isHoldingPickAxe()
PlayerisHoldingPickAxe in interface Playerpublic void findFreePosition(WorldVector searchPos)
PlayerfindFreePosition in interface PlayersearchPos - search positionpublic void setOnGround(WorldVector searchPos)
PlayersetOnGround in interface PlayersearchPos - The location to start searching frompublic void findFreePosition()
PlayerfindFreePosition in interface Playerpublic boolean ascendLevel()
PlayerascendLevel in interface Playerpublic boolean descendLevel()
PlayerdescendLevel in interface Playerpublic boolean ascendToCeiling(int clearance)
PlayerascendToCeiling in interface Playerclearance - How many blocks to leave above the player's headpublic boolean ascendToCeiling(int clearance,
boolean alwaysGlass)
PlayerascendToCeiling in interface Playerclearance - How many blocks to leave above the player's headalwaysGlass - Always put glass under the playerpublic boolean ascendUpwards(int distance)
PlayerascendUpwards in interface Playerdistance - How far up to teleportpublic boolean ascendUpwards(int distance,
boolean alwaysGlass)
PlayerascendUpwards in interface Playerdistance - How far up to teleportalwaysGlass - Always put glass under the playerpublic void floatAt(int x,
int y,
int z,
boolean alwaysGlass)
Playerpublic WorldVector getBlockIn()
PlayergetBlockIn in interface Playerpublic WorldVector getBlockOn()
PlayergetBlockOn in interface Playerpublic WorldVector getBlockTrace(int range, boolean useLastBlock)
PlayergetBlockTrace in interface Playerrange - how far to checks for blocksuseLastBlock - try to return the last valid air block foundpublic WorldVectorFace getBlockTraceFace(int range, boolean useLastBlock)
PlayergetBlockTraceFace in interface Playerrange - the rangeuseLastBlock - try to return the last valid air block foundpublic WorldVector getBlockTrace(int range)
PlayergetBlockTrace in interface Playerrange - How far to checks for blockspublic WorldVector getSolidBlockTrace(int range)
PlayergetSolidBlockTrace in interface Playerrange - How far to checks for blockspublic PlayerDirection getCardinalDirection()
PlayergetCardinalDirection in interface Playerpublic PlayerDirection getCardinalDirection(int yawOffset)
PlayergetCardinalDirection in interface PlayeryawOffset - offset that is added to the player's yaw before determining the cardinal directionpublic BaseBlock getBlockInHand() throws WorldEditException
PlayergetBlockInHand in interface PlayerWorldEditExceptionpublic boolean passThroughForwardWall(int range)
passThroughForwardWall in interface Playerrange - How far to checks for blockspublic void setPosition(Vector pos)
PlayersetPosition in interface Playerpos - where to move thempublic File openFileOpenDialog(String[] extensions)
ActoropenFileOpenDialog in interface Actorextensions - null to allow allpublic File openFileSaveDialog(String[] extensions)
ActoropenFileSaveDialog in interface Actorextensions - null to allow allpublic boolean canDestroyBedrock()
ActorcanDestroyBedrock in interface Actorpublic void dispatchCUIEvent(CUIEvent event)
ActordispatchCUIEvent in interface Actorevent - the eventpublic void checkPermission(String permission) throws AuthorizationException
SubjectcheckPermission in interface Subjectpermission - the permissionAuthorizationException - thrown if not permittedpublic boolean isPlayer()
Actorpublic boolean hasCreativeMode()
PlayerhasCreativeMode in interface Playerpublic Object clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionCopyright © 2010-2014. All Rights Reserved.