|
PocketMine
|
Public Member Functions | |
| getLeaveMessage () | |
| getClientId () | |
| getClientSecret () | |
| isBanned () | |
| setBanned ($value) | |
| isWhitelisted () | |
| setWhitelisted ($value) | |
| getPlayer () | |
| getFirstPlayed () | |
| getLastPlayed () | |
| hasPlayedBefore () | |
| setAllowFlight ($value) | |
| getAllowFlight () | |
| setAutoJump ($value) | |
| hasAutoJump () | |
| spawnTo (Player $player) | |
| getServer () | |
| getRemoveFormat () | |
| setRemoveFormat ($remove=true) | |
| canSee (Player $player) | |
| hidePlayer (Player $player) | |
| showPlayer (Player $player) | |
| canCollideWith (Entity $entity) | |
| resetFallDistance () | |
| isOnline () | |
| isOp () | |
| setOp ($value) | |
| isPermissionSet ($name) | |
| hasPermission ($name) | |
| addAttachment (Plugin $plugin, $name=null, $value=null) | |
| removeAttachment (PermissionAttachment $attachment) | |
| recalculatePermissions () | |
| getEffectivePermissions () | |
| __construct (SourceInterface $interface, $clientID, $ip, $port) | |
| removeAchievement ($achievementId) | |
| hasAchievement ($achievementId) | |
| isConnected () | |
| getDisplayName () | |
| setDisplayName ($name) | |
| setSkin ($str, $skinName) | |
| getAddress () | |
| getPort () | |
| getNextPosition () | |
| isSleeping () | |
| getSpawn () | |
| sendChunk ($x, $z, $payload, $ordering=FullChunkDataPacket::ORDER_COLUMNS) | |
| batchDataPacket (DataPacket $packet) | |
| dataPacket (DataPacket $packet, $needACK=false) | |
| directDataPacket (DataPacket $packet, $needACK=false) | |
| sleepOn (Vector3 $pos) | |
| setSpawn (Vector3 $pos) | |
| stopSleep () | |
| awardAchievement ($achievementId) | |
| getGamemode () | |
| setGamemode ($gm) | |
| sendSettings () | |
| isSurvival () | |
| isCreative () | |
| isSpectator () | |
| isAdventure () | |
| getDrops () | |
| addEntityMotion ($entityId, $x, $y, $z) | |
| addEntityMovement ($entityId, $x, $y, $z, $yaw, $pitch, $headYaw=null) | |
| setDataProperty ($id, $type, $value) | |
| setMotion (Vector3 $mot) | |
| onUpdate ($currentTick) | |
| checkNetwork () | |
| canInteract (Vector3 $pos, $maxDistance, $maxDiff=0.5) | |
| onPlayerPreLogin () | |
| tryAuthenticate () | |
| authenticateCallback ($valid) | |
| kick ($reason="", $isAdmin=true) | |
| sendMessage ($message) | |
| sendTranslation ($message, array $parameters=[]) | |
| sendPopup ($message, $subtitle="") | |
| sendTip ($message) | |
| close ($message="", $reason="generic reason", $notify=true) | |
| __debugInfo () | |
| save ($async=false) | |
| getName () | |
| kill () | |
| setHealth ($amount) | |
| attack ($damage, EntityDamageEvent $source) | |
| sendPosition (Vector3 $pos, $yaw=null, $pitch=null, $mode=0, array $targets=null) | |
| teleport (Vector3 $pos, $yaw=null, $pitch=null) | |
| teleportImmediate (Vector3 $pos, $yaw=null, $pitch=null) | |
| getWindowId (Inventory $inventory) | |
| addWindow (Inventory $inventory, $forceId=null) | |
| removeWindow (Inventory $inventory) | |
| setMetadata ($metadataKey, MetadataValue $metadataValue) | |
| getMetadata ($metadataKey) | |
| hasMetadata ($metadataKey) | |
| removeMetadata ($metadataKey, Plugin $plugin) | |
| onChunkChanged (FullChunk $chunk) | |
| onChunkLoaded (FullChunk $chunk) | |
| onChunkPopulated (FullChunk $chunk) | |
| onChunkUnloaded (FullChunk $chunk) | |
| onBlockChanged (Vector3 $block) | |
| getLoaderId () | |
| isLoaderActive () | |
Public Member Functions inherited from Human | |
| getSkinData () | |
| getSkinName () | |
| getUniqueId () | |
| getRawUniqueId () | |
| setSkin ($str, $skinName) | |
| getInventory () | |
| getName () | |
| getDrops () | |
| saveNBT () | |
| spawnTo (Player $player) | |
| despawnFrom (Player $player) | |
| close () | |
Public Member Functions inherited from Living | |
| setHealth ($amount) | |
| saveNBT () | |
| getName () | |
| hasLineOfSight (Entity $entity) | |
| heal ($amount, EntityRegainHealthEvent $source) | |
| attack ($damage, EntityDamageEvent $source) | |
| knockBack (Entity $attacker, $damage, $x, $z, $base=0.4) | |
| kill () | |
| entityBaseTick ($tickDiff=1) | |
| getDrops () | |
| getLineOfSight ($maxDistance, $maxLength=0, array $transparent=[]) | |
| getTargetBlock ($maxDistance, array $transparent=[]) | |
Public Member Functions inherited from Entity | |
| __construct (FullChunk $chunk, Compound $nbt) | |
| getNameTag () | |
| isNameTagVisible () | |
| setNameTag ($name) | |
| setNameTagVisible ($value=true) | |
| isSneaking () | |
| setSneaking ($value=true) | |
| isSprinting () | |
| setSprinting ($value=true) | |
| getEffects () | |
| removeAllEffects () | |
| removeEffect ($effectId) | |
| getEffect ($effectId) | |
| hasEffect ($effectId) | |
| addEffect (Effect $effect) | |
| getSaveId () | |
| saveNBT () | |
| getViewers () | |
| spawnTo (Player $player) | |
| sendPotionEffects (Player $player) | |
| sendMetadata ($player) | |
| sendData ($player, array $data=null) | |
| despawnFrom (Player $player) | |
| attack ($damage, EntityDamageEvent $source) | |
| heal ($amount, EntityRegainHealthEvent $source) | |
| getHealth () | |
| isAlive () | |
| setHealth ($amount) | |
| setLastDamageCause (EntityDamageEvent $type) | |
| getLastDamageCause () | |
| getMaxHealth () | |
| setMaxHealth ($amount) | |
| canCollideWith (Entity $entity) | |
| entityBaseTick ($tickDiff=1) | |
| getDirectionVector () | |
| getDirectionPlane () | |
| onUpdate ($currentTick) | |
| scheduleUpdate () | |
| isOnFire () | |
| setOnFire ($seconds) | |
| getDirection () | |
| extinguish () | |
| canTriggerWalking () | |
| resetFallDistance () | |
| getBoundingBox () | |
| fall ($fallDistance) | |
| handleLavaMovement () | |
| getEyeHeight () | |
| moveFlying () | |
| onCollideWithPlayer (Human $entityPlayer) | |
| getPosition () | |
| getLocation () | |
| isInsideOfWater () | |
| isInsideOfSolid () | |
| fastMove ($dx, $dy, $dz) | |
| move ($dx, $dy, $dz) | |
| getBlocksAround () | |
| setPositionAndRotation (Vector3 $pos, $yaw, $pitch) | |
| setRotation ($yaw, $pitch) | |
| setPosition (Vector3 $pos) | |
| getMotion () | |
| setMotion (Vector3 $motion) | |
| isOnGround () | |
| kill () | |
| teleport (Vector3 $pos, $yaw=null, $pitch=null) | |
| getId () | |
| respawnToAll () | |
| spawnToAll () | |
| despawnFromAll () | |
| close () | |
| setDataProperty ($id, $type, $value) | |
| getDataProperty ($id) | |
| getDataPropertyType ($id) | |
| setDataFlag ($propertyId, $id, $value=true, $type=self::DATA_TYPE_BYTE) | |
| getDataFlag ($propertyId, $id) | |
| setMetadata ($metadataKey, MetadataValue $metadataValue) | |
| getMetadata ($metadataKey) | |
| hasMetadata ($metadataKey) | |
| removeMetadata ($metadataKey, Plugin $plugin) | |
| __toString () | |
Public Member Functions inherited from Location | |
| __construct ($x=0, $y=0, $z=0, $yaw=0.0, $pitch=0.0, Level $level=null) | |
| getYaw () | |
| getPitch () | |
| __toString () | |
Public Member Functions inherited from Position | |
| __construct ($x=0, $y=0, $z=0, Level $level=null) | |
| getLevel () | |
| setLevel (Level $level) | |
| isValid () | |
| setStrong () | |
| setWeak () | |
| getSide ($side, $step=1) | |
| __toString () | |
| setComponents ($x, $y, $z) | |
Public Member Functions inherited from Vector3 | |
| __construct ($x=0, $y=0, $z=0) | |
| getX () | |
| getY () | |
| getZ () | |
| getFloorX () | |
| getFloorY () | |
| getFloorZ () | |
| getRight () | |
| getUp () | |
| getForward () | |
| getSouth () | |
| getWest () | |
| add ($x, $y=0, $z=0) | |
| subtract ($x=0, $y=0, $z=0) | |
| multiply ($number) | |
| divide ($number) | |
| ceil () | |
| floor () | |
| round () | |
| abs () | |
| getSide ($side, $step=1) | |
| distance (Vector3 $pos) | |
| distanceSquared (Vector3 $pos) | |
| maxPlainDistance ($x=0, $z=0) | |
| length () | |
| lengthSquared () | |
| normalize () | |
| dot (Vector3 $v) | |
| cross (Vector3 $v) | |
| equals (Vector3 $v) | |
| getIntermediateWithXValue (Vector3 $v, $x) | |
| getIntermediateWithYValue (Vector3 $v, $y) | |
| getIntermediateWithZValue (Vector3 $v, $z) | |
| setComponents ($x, $y, $z) | |
| __toString () | |
Public Member Functions inherited from ChunkLoader | |
| getPosition () | |
| getX () | |
| getZ () | |
| getLevel () | |
Static Public Member Functions | |
| static | getChunkCacheFromData ($chunkX, $chunkZ, $payload, $ordering=FullChunkDataPacket::ORDER_COLUMNS) |
Static Public Member Functions inherited from Entity | |
| static | createEntity ($type, FullChunk $chunk, Compound $nbt,...$args) |
| static | registerEntity ($className, $force=false) |
Static Public Member Functions inherited from Location | |
| static | fromObject (Vector3 $pos, Level $level=null, $yaw=0.0, $pitch=0.0) |
Static Public Member Functions inherited from Position | |
| static | fromObject (Vector3 $pos, Level $level=null) |
Static Public Member Functions inherited from Vector3 | |
| static | getOppositeSide ($side) |
Data Fields | |
| const | SURVIVAL = 0 |
| const | CREATIVE = 1 |
| const | ADVENTURE = 2 |
| const | SPECTATOR = 3 |
| const | VIEW = Player::SPECTATOR |
| const | SURVIVAL_SLOTS = 36 |
| const | CREATIVE_SLOTS = 112 |
| $spawned = false | |
| $loggedIn = false | |
| $gamemode | |
| $lastBreak | |
| $speed = null | |
| $blocked = false | |
| $achievements = [] | |
| $lastCorrect | |
| $craftingType = 0 | |
| $loginData = [] | |
| $creationTime = 0 | |
| $usedChunks = [] | |
Data Fields inherited from Human | |
| const | DATA_PLAYER_FLAG_SLEEP = 1 |
| const | DATA_PLAYER_FLAG_DEAD = 2 |
| const | DATA_PLAYER_FLAGS = 16 |
| const | DATA_PLAYER_BED_POSITION = 17 |
| $width = 0.6 | |
| $length = 0.6 | |
| $height = 1.8 | |
| $eyeHeight = 1.62 | |
Data Fields inherited from Entity | |
| const | NETWORK_ID = -1 |
| const | DATA_TYPE_BYTE = 0 |
| const | DATA_TYPE_SHORT = 1 |
| const | DATA_TYPE_INT = 2 |
| const | DATA_TYPE_FLOAT = 3 |
| const | DATA_TYPE_STRING = 4 |
| const | DATA_TYPE_SLOT = 5 |
| const | DATA_TYPE_POS = 6 |
| const | DATA_TYPE_ROTATION = 7 |
| const | DATA_TYPE_LONG = 8 |
| const | DATA_FLAGS = 0 |
| const | DATA_AIR = 1 |
| const | DATA_NAMETAG = 2 |
| const | DATA_SHOW_NAMETAG = 3 |
| const | DATA_SILENT = 4 |
| const | DATA_POTION_COLOR = 7 |
| const | DATA_POTION_AMBIENT = 8 |
| const | DATA_NO_AI = 15 |
| const | DATA_FLAG_ONFIRE = 0 |
| const | DATA_FLAG_SNEAKING = 1 |
| const | DATA_FLAG_RIDING = 2 |
| const | DATA_FLAG_SPRINTING = 3 |
| const | DATA_FLAG_ACTION = 4 |
| const | DATA_FLAG_INVISIBLE = 5 |
| $passenger = null | |
| $vehicle = null | |
| $chunk | |
| $lastX = null | |
| $lastY = null | |
| $lastZ = null | |
| $motionX | |
| $motionY | |
| $motionZ | |
| $temporalVector | |
| $lastMotionX | |
| $lastMotionY | |
| $lastMotionZ | |
| $lastYaw | |
| $lastPitch | |
| $boundingBox | |
| $onGround | |
| $inBlock = false | |
| $positionChanged | |
| $motionChanged | |
| $deadTicks = 0 | |
| $height | |
| $eyeHeight = null | |
| $width | |
| $length | |
| $keepMovement = false | |
| $fallDistance = 0 | |
| $ticksLived = 0 | |
| $lastUpdate | |
| $maxFireTicks | |
| $fireTicks = 0 | |
| $namedtag | |
| $canCollide = true | |
| $isCollided = false | |
| $isCollidedHorizontally = false | |
| $isCollidedVertically = false | |
| $noDamageTicks | |
| $closed = false | |
Data Fields inherited from Location | |
| $yaw | |
| $pitch | |
Data Fields inherited from Position | |
| $level = null | |
Data Fields inherited from Vector3 | |
| const | SIDE_DOWN = 0 |
| const | SIDE_UP = 1 |
| const | SIDE_NORTH = 2 |
| const | SIDE_SOUTH = 3 |
| const | SIDE_WEST = 4 |
| const | SIDE_EAST = 5 |
| $x | |
| $y | |
| $z | |
Protected Member Functions | |
| switchLevel (Level $targetLevel) | |
| sendNextChunk () | |
| doFirstSpawn () | |
| orderChunks () | |
| checkGroundState ($movX, $movY, $movZ, $dx, $dy, $dz) | |
| checkBlockCollision () | |
| checkNearEntities ($tickDiff) | |
| processMovement ($tickDiff) | |
| updateMovement () | |
| checkTeleportPosition () | |
Protected Member Functions inherited from Human | |
| initEntity () | |
Protected Member Functions inherited from Living | |
| initEntity () | |
Protected Member Functions inherited from Entity | |
| recalculateEffectColor () | |
| initEntity () | |
| checkObstruction ($x, $y, $z) | |
| updateMovement () | |
| updateFallState ($distanceThisTick, $onGround) | |
| switchLevel (Level $targetLevel) | |
| checkGroundState ($movX, $movY, $movZ, $dx, $dy, $dz) | |
| checkBlockCollision () | |
| checkChunks () | |
Protected Attributes | |
| $interface | |
| $windowCnt = 2 | |
| $windows | |
| $windowIndex = [] | |
| $messageCounter = 2 | |
| $sendIndex = 0 | |
| $currentTransaction = null | |
| $isCrafting = false | |
| $randomClientId | |
| $lastMovement = 0 | |
| $forceMovement = null | |
| $teleportPosition = null | |
| $connected = true | |
| $ip | |
| $removeFormat = true | |
| $port | |
| $username | |
| $iusername | |
| $displayName | |
| $startAction = -1 | |
| $sleeping = null | |
| $clientID = null | |
| $stepHeight = 0.6 | |
| $chunkLoadCount = 0 | |
| $loadQueue = [] | |
| $nextChunkOrderRun = 5 | |
| $hiddenPlayers = [] | |
| $newPosition | |
| $viewDistance | |
| $chunksPerTick | |
| $spawnThreshold | |
| $inAirTicks = 0 | |
| $startAirTicks = 5 | |
| $autoJump = true | |
| $allowFlight = false | |
Protected Attributes inherited from Human | |
| $inventory | |
| $uuid | |
| $rawUUID | |
| $skinName | |
| $skin | |
Protected Attributes inherited from Living | |
| $gravity = 0.08 | |
| $drag = 0.02 | |
| $attackTime = 0 | |
| $invisible = false | |
Protected Attributes inherited from Entity | |
| $hasSpawned = [] | |
| $effects = [] | |
| $id | |
| $dataFlags = 0 | |
| $dataProperties | |
| $lastDamageCause = null | |
| $age = 0 | |
| $ySize = 0 | |
| $stepHeight = 0 | |
| $isStatic = false | |
| $justCreated | |
| $fireProof | |
| $gravity | |
| $drag | |
| $server | |
| $timings | |
| $isPlayer = false | |
Additional Inherited Members | |
Static Public Attributes inherited from Entity | |
| static | $entityCount = 1 |
Main class that handles networking, recovery, and packet sending to the server part
| __construct | ( | SourceInterface | $interface, |
| $clientID, | |||
| $ip, | |||
| $port | |||
| ) |
| SourceInterface | $interface | |
| null | $clientID | |
| string | $ip | |
| integer | $port |
| addAttachment | ( | Plugin | $plugin, |
$name = null, |
|||
$value = null |
|||
| ) |
| addEntityMotion | ( | $entityId, | |
| $x, | |||
| $y, | |||
| $z | |||
| ) |
| addEntityMovement | ( | $entityId, | |
| $x, | |||
| $y, | |||
| $z, | |||
| $yaw, | |||
| $pitch, | |||
$headYaw = null |
|||
| ) |
| addWindow | ( | Inventory | $inventory, |
$forceId = null |
|||
| ) |
Returns the created/existing window id
| Inventory | $inventory | |
| int | $forceId |
| awardAchievement | ( | $achievementId | ) |
| string | $achievementId |
| batchDataPacket | ( | DataPacket | $packet | ) |
Batch a Data packet into the channel list to send at the end of the tick
| DataPacket | $packet |
|
final |
Note for plugin developers: use kick() with the isAdmin flag set to kick without the "Kicked by admin" part instead of this method.
| string | $message | Message to be broadcasted |
| string | $reason | Reason showed in console |
| bool | $notify |
| dataPacket | ( | DataPacket | $packet, |
$needACK = false |
|||
| ) |
Sends an ordered DataPacket to the send buffer
| DataPacket | $packet | |
| bool | $needACK |
| directDataPacket | ( | DataPacket | $packet, |
$needACK = false |
|||
| ) |
| DataPacket | $packet | |
| bool | $needACK |
| getAddress | ( | ) |
Gets the player IP address
|
static |
| $chunkX | |
| $chunkZ | |
| $payload |
| getClientId | ( | ) |
This might disappear in the future. Please use getUniqueId() instead (IP + clientId + name combo, in the future it'll change to real UUID for online auth)
| getDisplayName | ( | ) |
Gets the "friendly" name to display of this player to use in the chat.
| getEffectivePermissions | ( | ) |
Implements Permissible.
| getFirstPlayed | ( | ) |
Implements IPlayer.
| getGamemode | ( | ) |
| getLastPlayed | ( | ) |
Implements IPlayer.
| getLoaderId | ( | ) |
Returns the ChunkLoader id. Call Level::generateChunkLoaderId($this) to generate and save it
Implements ChunkLoader.
| getMetadata | ( | $metadataKey | ) |
Returns a list of previously set metadata values from the implementing object's metadata store.
| string | $metadataKey |
Implements Metadatable.
| getName | ( | ) |
| getPlayer | ( | ) |
Implements IPlayer.
| getPort | ( | ) |
| getRemoveFormat | ( | ) |
| getServer | ( | ) |
Implements CommandSender.
| getSpawn | ( | ) |
| getWindowId | ( | Inventory | $inventory | ) |
| Inventory | $inventory |
| hasAchievement | ( | $achievementId | ) |
| string | $achievementId |
| hasMetadata | ( | $metadataKey | ) |
Tests to see whether the implementing object contains the given metadata value in its metadata store.
| string | $metadataKey |
Implements Metadatable.
| hasPermission | ( | $name | ) |
| hasPlayedBefore | ( | ) |
Implements IPlayer.
| isBanned | ( | ) |
Implements IPlayer.
| isConnected | ( | ) |
| isLoaderActive | ( | ) |
| isOnline | ( | ) |
Implements IPlayer.
| isOp | ( | ) |
Implements ServerOperator.
| isPermissionSet | ( | $name | ) |
| isSleeping | ( | ) |
| isWhitelisted | ( | ) |
Implements IPlayer.
| kick | ( | $reason = "", |
|
$isAdmin = true |
|||
| ) |
Kicks a player from the server
| string | $reason | |
| bool | $isAdmin |
| onBlockChanged | ( | Vector3 | $block | ) |
This method will be called when a block changes in a registered chunk
| Block | Vector3 | $block |
Implements ChunkLoader.
| onChunkChanged | ( | FullChunk | $chunk | ) |
This method will be called when a Chunk is replaced by a new one
| FullChunk | $chunk |
Implements ChunkLoader.
| onChunkLoaded | ( | FullChunk | $chunk | ) |
This method will be called when a registered chunk is loaded
| FullChunk | $chunk |
Implements ChunkLoader.
| onChunkPopulated | ( | FullChunk | $chunk | ) |
This method will be called when a registered chunk is populated Usually it'll be sent with another call to onChunkChanged()
| FullChunk | $chunk |
Implements ChunkLoader.
| onChunkUnloaded | ( | FullChunk | $chunk | ) |
This method will be called when a registered chunk is unloaded
| FullChunk | $chunk |
Implements ChunkLoader.
| recalculatePermissions | ( | ) |
Implements Permissible.
| removeAchievement | ( | $achievementId | ) |
| string | $achievementId |
| removeAttachment | ( | PermissionAttachment | $attachment | ) |
| PermissionAttachment | $attachment |
Implements Permissible.
| removeMetadata | ( | $metadataKey, | |
| Plugin | $owningPlugin | ||
| ) |
Removes the given metadata value from the implementing object's metadata store.
| string | $metadataKey | |
| Plugin | $owningPlugin |
Implements Metadatable.
| save | ( | $async = false | ) |
Handles player data saving
| sendMessage | ( | $message | ) |
Sends a direct chat message to a player
| string | TextContainer | $message |
Implements CommandSender.
| sendSettings | ( | ) |
Sends all the option flags
| setBanned | ( | $banned | ) |
| bool | $banned |
Implements IPlayer.
| setDisplayName | ( | $name | ) |
| string | $name |
| setGamemode | ( | $gm | ) |
| setMetadata | ( | $metadataKey, | |
| MetadataValue | $newMetadataValue | ||
| ) |
Sets a metadata value in the implementing object's metadata store.
| string | $metadataKey | |
| MetadataValue | $newMetadataValue |
Implements Metadatable.
| setOp | ( | $value | ) |
| bool | $value |
Implements ServerOperator.
| setRemoveFormat | ( | $remove = true | ) |
| bool | $remove |
| setSpawn | ( | Vector3 | $pos | ) |
Sets the spawnpoint of the player (and the compass direction) to a Vector3, or set it on another world with a Position object
| Vector3 | Position | $pos |
| setWhitelisted | ( | $value | ) |
| bool | $value |
Implements IPlayer.
| sleepOn | ( | Vector3 | $pos | ) |
| Vector3 | $pos |
| teleport | ( | Vector3 | $pos, |
$yaw = null, |
|||
$pitch = null |
|||
| ) |
| Vector3 | Position | Location | $pos | |
| float | $yaw | |
| float | $pitch |
| teleportImmediate | ( | Vector3 | $pos, |
$yaw = null, |
|||
$pitch = null |
|||
| ) |
This method may not be reliable. Clients don't like to be moved into unloaded chunks. Use teleport() for a delayed teleport after chunks have been sent.
| Vector3 | $pos | |
| float | $yaw | |
| float | $pitch |