Class AsyncPlayer
java.lang.Object
com.sk89q.worldedit.extension.platform.AbstractPlayerActor
com.sk89q.worldedit.extension.platform.PlayerProxy
com.fastasyncworldedit.core.wrappers.AsyncPlayer
- All Implemented Interfaces:
MapMetadatable,Metadatable,Entity,Player,Actor,Locatable,SessionOwner,Subject,Faceted,Identifiable,Cloneable
- Direct Known Subclasses:
LocationMaskedPlayerWrapper,SilentPlayerWrapper
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.fastasyncworldedit.core.entity.Metadatable
Metadatable.METADATA_KEYS -
Field Summary
Fields inherited from interface com.sk89q.worldedit.util.Identifiable
CONSOLE, EVERYONE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanGo up one level to the next free space above.booleanascendToCeiling(int clearance) Ascend to the ceiling above.booleanascendToCeiling(int clearance, boolean alwaysGlass) Ascend to the ceiling above.booleanascendUpwards(int distance) Just go up.booleanascendUpwards(int distance, boolean alwaysGlass) Just go up.booleanGo up one level to the next free space above.voidFind a position for the player to stand that is not inside a block.voidfindFreePosition(Location searchPos) Find a position for the actor to stand that is not inside a block.voidfloatAt(int x, int y, int z, boolean alwaysGlass) Make the player float in the given blocks.getBlockTrace(int range, boolean useLastBlock) Get the point of the block being looked at.getBlockTraceFace(int range, boolean useLastBlock) Get the face that the player is looking at.Get the player's cardinal direction (N, W, NW, etc.).getSolidBlockTrace(int range) Get the point of the block being looked at.getWorld()Return the world that the player is on.booleanpassThroughForwardWall(int range) Pass through the wall that you are looking at.voidsetOnGround(Location searchPos) Set the actor on the ground.voidsetPosition(Vector3 pos, float pitch, float yaw) Move the player.static AsyncPlayerMethods inherited from class com.sk89q.worldedit.extension.platform.PlayerProxy
dispatchCUIEvent, getBasePlayer, getBlockInHand, getDisplayName, getFacet, getGameMode, getGroups, getInventoryBlockBag, getItemInHand, getLocale, getLocation, getName, getSessionKey, getState, getUniqueId, giveItem, hasPermission, print, print, printDebug, printError, printRaw, runAction, sendAnnouncements, sendFakeBlock, sendTitle, setGameMode, setLocation, setOffset, setPermission, togglePermission, trySetPosition, unwrapMethods inherited from class com.sk89q.worldedit.extension.platform.AbstractPlayerActor
canDestroyBedrock, checkPermission, clone, equals, getAllowedRegions, getAllowedRegions, getBlockOn, getBlockTrace, getBlockTrace, getBlockTraceFace, getCardinalDirection, getDisallowedRegions, getDisallowedRegions, getExtent, getLargestRegion, getRawMeta, hashCode, isAllowedToFly, isHoldingPickAxe, isPlayer, loadClipboardFromDisk, openFileOpenDialog, openFileSaveDialog, remove, setFlying, setSelection, trySetPositionMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.sk89q.worldedit.extension.platform.Actor
cancel, checkAction, confirm, decline, getLimit, printDebug, printError, printInfo, queueAction, runAsyncIfFree, runIfFreeMethods inherited from interface com.sk89q.worldedit.extension.platform.Locatable
getBlockLocation, setPositionMethods inherited from interface com.fastasyncworldedit.core.entity.MapMetadatable
deleteMeta, getAndSetMeta, getMeta, getMeta, hasMeta, putIfAbsent, setMetaMethods inherited from interface com.sk89q.worldedit.entity.Player
getBlockIn, getSelection, getWorldForEditing, setSelection, unregisterMethods inherited from interface com.sk89q.worldedit.session.SessionOwner
getSession
-
Constructor Details
-
AsyncPlayer
-
-
Method Details
-
wrap
-
getWorld
Description copied from interface:PlayerReturn the world that the player is on.- Specified by:
getWorldin interfacePlayer- Overrides:
getWorldin classPlayerProxy- Returns:
- the world
-
findFreePosition
Description copied from interface:PlayerFind a position for the actor to stand that is not inside a block. Blocks above the player will be iteratively tested until there is a series of two free blocks. The actor will be teleported to that free position.- Specified by:
findFreePositionin interfacePlayer- Overrides:
findFreePositionin classPlayerProxy- Parameters:
searchPos- search position
-
setOnGround
Description copied from interface:PlayerSet the actor on the ground.- Specified by:
setOnGroundin interfacePlayer- Overrides:
setOnGroundin classPlayerProxy- Parameters:
searchPos- The location to start searching from
-
findFreePosition
public void findFreePosition()Description copied from interface:PlayerFind a position for the player to stand that is not inside a block. Blocks above the player will be iteratively tested until there is a series of two free blocks. The player will be teleported to that free position.- Specified by:
findFreePositionin interfacePlayer- Overrides:
findFreePositionin classPlayerProxy
-
ascendLevel
public boolean ascendLevel()Description copied from interface:PlayerGo up one level to the next free space above.- Specified by:
ascendLevelin interfacePlayer- Overrides:
ascendLevelin classPlayerProxy- Returns:
- true if a spot was found
-
descendLevel
public boolean descendLevel()Description copied from interface:PlayerGo up one level to the next free space above.- Specified by:
descendLevelin interfacePlayer- Overrides:
descendLevelin classPlayerProxy- Returns:
- true if a spot was found
-
ascendToCeiling
public boolean ascendToCeiling(int clearance) Description copied from interface:PlayerAscend to the ceiling above.- Specified by:
ascendToCeilingin interfacePlayer- Overrides:
ascendToCeilingin classPlayerProxy- Parameters:
clearance- How many blocks to leave above the player's head- Returns:
- whether the player was moved
-
ascendToCeiling
public boolean ascendToCeiling(int clearance, boolean alwaysGlass) Description copied from interface:PlayerAscend to the ceiling above.- Specified by:
ascendToCeilingin interfacePlayer- Overrides:
ascendToCeilingin classPlayerProxy- Parameters:
clearance- How many blocks to leave above the player's headalwaysGlass- Always put glass under the player- Returns:
- whether the player was moved
-
ascendUpwards
public boolean ascendUpwards(int distance) Description copied from interface:PlayerJust go up.- Specified by:
ascendUpwardsin interfacePlayer- Overrides:
ascendUpwardsin classPlayerProxy- Parameters:
distance- How far up to teleport- Returns:
- whether the player was moved
-
ascendUpwards
public boolean ascendUpwards(int distance, boolean alwaysGlass) Description copied from interface:PlayerJust go up.- Specified by:
ascendUpwardsin interfacePlayer- Overrides:
ascendUpwardsin classPlayerProxy- Parameters:
distance- How far up to teleportalwaysGlass- Always put glass under the player- Returns:
- whether the player was moved
-
floatAt
public void floatAt(int x, int y, int z, boolean alwaysGlass) Description copied from interface:PlayerMake the player float in the given blocks.- Specified by:
floatAtin interfacePlayer- Overrides:
floatAtin classPlayerProxy- Parameters:
x- 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 in
-
setPosition
Description copied from interface:PlayerMove the player.- Parameters:
pos- 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 degrees
-
getBlockTrace
Description copied from interface:PlayerGet the point of the block being looked at. May return null. Will return the farthest away air block if useLastBlock is true and no other block is found.- Specified by:
getBlockTracein interfacePlayer- Overrides:
getBlockTracein classAbstractPlayerActor- Parameters:
range- how far to checks for blocksuseLastBlock- try to return the last valid air block found- Returns:
- point
-
getBlockTraceFace
Description copied from interface:PlayerGet the face that the player is looking at.- Specified by:
getBlockTraceFacein interfacePlayer- Overrides:
getBlockTraceFacein classAbstractPlayerActor- Parameters:
range- the rangeuseLastBlock- try to return the last valid air block found- Returns:
- a face
-
getSolidBlockTrace
Description copied from interface:PlayerGet the point of the block being looked at. May return null.- Specified by:
getSolidBlockTracein interfacePlayer- Overrides:
getSolidBlockTracein classAbstractPlayerActor- Parameters:
range- How far to checks for blocks- Returns:
- point
-
getCardinalDirection
Description copied from interface:PlayerGet the player's cardinal direction (N, W, NW, etc.). May return null.- Specified by:
getCardinalDirectionin interfacePlayer- Overrides:
getCardinalDirectionin classAbstractPlayerActor- Returns:
- the direction
-
passThroughForwardWall
public boolean passThroughForwardWall(int range) Description copied from interface:PlayerPass through the wall that you are looking at.- Specified by:
passThroughForwardWallin interfacePlayer- Overrides:
passThroughForwardWallin classAbstractPlayerActor- Parameters:
range- How far to checks for blocks- Returns:
- whether the player was pass through
-