Class LocationMaskedPlayerWrapper
java.lang.Object
com.sk89q.worldedit.extension.platform.AbstractPlayerActor
com.sk89q.worldedit.extension.platform.PlayerProxy
com.fastasyncworldedit.core.wrappers.AsyncPlayer
com.fastasyncworldedit.core.wrappers.LocationMaskedPlayerWrapper
- All Implemented Interfaces:
MapMetadatable
,Metadatable
,Entity
,Player
,Actor
,Locatable
,SessionOwner
,Subject
,Faceted
,Identifiable
,Cloneable
-
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
ConstructorDescriptionLocationMaskedPlayerWrapper
(Player parent, Location position) LocationMaskedPlayerWrapper
(Player parent, Location position, boolean allowTeleport) -
Method Summary
Modifier and TypeMethodDescriptionboolean
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
Go up one level to the next free space above.void
Find a position for the player to stand that is not inside a block.void
findFreePosition
(Location 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.Get the location of this actor.void
setOnGround
(Location searchPos) Set the actor on the ground.void
setPosition
(Vector3 pos) Sets the position of this actor.void
setPosition
(Vector3 pos, float pitch, float yaw) Move the player.Methods inherited from class com.fastasyncworldedit.core.wrappers.AsyncPlayer
getBlockTrace, getBlockTraceFace, getCardinalDirection, getSolidBlockTrace, getWorld, passThroughForwardWall, wrap
Methods inherited from class com.sk89q.worldedit.extension.platform.PlayerProxy
dispatchCUIEvent, getBasePlayer, getBlockInHand, getDisplayName, getFacet, getGameMode, getGroups, getInventoryBlockBag, getItemInHand, getLocale, getName, getSessionKey, getState, getUniqueId, giveItem, hasPermission, print, print, printDebug, printError, printRaw, runAction, sendAnnouncements, sendFakeBlock, sendTitle, setGameMode, setLocation, setOffset, setPermission, togglePermission, trySetPosition, unwrap
Methods 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, openFileOpenDialog, openFileSaveDialog, remove, setFlying, setSelection, trySetPosition
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.sk89q.worldedit.extension.platform.Actor
cancel, checkAction, confirm, decline, getLimit, printDebug, printError, printInfo, queueAction, runAsyncIfFree, runIfFree
Methods inherited from interface com.sk89q.worldedit.extension.platform.Locatable
getBlockLocation
Methods inherited from interface com.fastasyncworldedit.core.entity.MapMetadatable
deleteMeta, getAndSetMeta, getMeta, getMeta, hasMeta, putIfAbsent, setMeta
Methods inherited from interface com.sk89q.worldedit.entity.Player
getBlockIn, getSelection, getWorldForEditing, loadClipboardFromDisk, setSelection, unregister
Methods inherited from interface com.sk89q.worldedit.session.SessionOwner
getSession
-
Constructor Details
-
LocationMaskedPlayerWrapper
-
LocationMaskedPlayerWrapper
-
-
Method Details
-
getLocation
Description copied from interface:Locatable
Get the location of this actor.- Specified by:
getLocation
in interfaceLocatable
- Overrides:
getLocation
in classPlayerProxy
- Returns:
- the location of the actor
-
setPosition
Description copied from interface:Locatable
Sets the position of this actor.- Parameters:
pos
- where to move them
-
setPosition
Description copied from interface:Player
Move the player.- Specified by:
setPosition
in interfacePlayer
- Overrides:
setPosition
in classAsyncPlayer
- 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
-
findFreePosition
Description copied from interface:Player
Find 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:
findFreePosition
in interfacePlayer
- Overrides:
findFreePosition
in classAsyncPlayer
- Parameters:
searchPos
- search position
-
setOnGround
Description copied from interface:Player
Set the actor on the ground.- Specified by:
setOnGround
in interfacePlayer
- Overrides:
setOnGround
in classAsyncPlayer
- Parameters:
searchPos
- The location to start searching from
-
findFreePosition
public void findFreePosition()Description copied from interface:Player
Find 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:
findFreePosition
in interfacePlayer
- Overrides:
findFreePosition
in classAsyncPlayer
-
ascendLevel
public boolean ascendLevel()Description copied from interface:Player
Go up one level to the next free space above.- Specified by:
ascendLevel
in interfacePlayer
- Overrides:
ascendLevel
in classAsyncPlayer
- Returns:
- true if a spot was found
-
descendLevel
public boolean descendLevel()Description copied from interface:Player
Go up one level to the next free space above.- Specified by:
descendLevel
in interfacePlayer
- Overrides:
descendLevel
in classAsyncPlayer
- Returns:
- true if a spot was found
-
ascendToCeiling
public boolean ascendToCeiling(int clearance) Description copied from interface:Player
Ascend to the ceiling above.- Specified by:
ascendToCeiling
in interfacePlayer
- Overrides:
ascendToCeiling
in classAsyncPlayer
- 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:Player
Ascend to the ceiling above.- Specified by:
ascendToCeiling
in interfacePlayer
- Overrides:
ascendToCeiling
in classAsyncPlayer
- 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:Player
Just go up.- Specified by:
ascendUpwards
in interfacePlayer
- Overrides:
ascendUpwards
in classAsyncPlayer
- 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:Player
Just go up.- Specified by:
ascendUpwards
in interfacePlayer
- Overrides:
ascendUpwards
in classAsyncPlayer
- 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:Player
Make the player float in the given blocks.- Specified by:
floatAt
in interfacePlayer
- Overrides:
floatAt
in classAsyncPlayer
- 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
-