Свойство | Тип | Описание | |
---|---|---|---|
$achievements | |||
$blocked | |||
$craftingType | |||
$creationTime | |||
$fishingHook | |||
$foodTick | |||
$foodUsageTime | |||
$fromPos | |||
$gamemode | |||
$lastBreak | |||
$lastCorrect | |||
$loggedIn | |||
$playedBefore | boolean | ||
$selectedLev | |||
$selectedPos | |||
$spawned | |||
$speed | |||
$starvationTick | |||
$usedChunks | |||
$weatherData |
Свойство | Тип | Описание | |
---|---|---|---|
$allowFlight | |||
$autoJump | |||
$chunkLoadCount | |||
$chunksPerTick | |||
$clientID | |||
$connected | |||
$displayName | |||
$forceMovement | |||
$hiddenPlayers | |||
$inAirTicks | |||
$interface | pocketmine\network\SourceInterface | ||
$ip | |||
$isCrafting | 0 = 2x2 crafting, 1 = 3x3 crafting, 2 = anvil, 3 = enchanting | ||
$iusername | |||
$lastMovement | |||
$loadQueue | |||
$messageCounter | |||
$moving | |||
$newPosition | |||
$nextChunkOrderRun | |||
$personalCreativeItems | |||
$port | |||
$protocol | |||
$randomClientId | |||
$removeFormat | |||
$sendIndex | |||
$shouldSendStatus | |||
$sleeping | |||
$spawnPosition | null | |
||
$spawnThreshold | |||
$startAction | |||
$startAirTicks | |||
$stepHeight | |||
$teleportPosition | |||
$username | |||
$viewDistance | |||
$windowCnt | |||
$windowIndex | pocketmine\inventory\Inventory[] | ||
$windows | SplObjectStorage |
Метод | Описание | |
---|---|---|
__construct ( pocketmine\network\SourceInterface $interface, null $clientID, string $ip, integer $port ) | ||
__debugInfo ( ) | ||
addAttachment ( pocketmine\plugin\Plugin $plugin, string $name = null, boolean $value = null ) : |
||
addCreativeItem ( |
||
addExpLevel ( integer $level ) | ||
addExperience ( integer $exp ) | ||
addMovement ( $x, $y, $z, $yaw, $pitch, $headYaw = null ) | ||
addWindow ( pocketmine\inventory\Inventory $inventory, integer $forceId = null ) : integer | Returns the created/existing window id | |
attack ( $damage, |
||
awardAchievement ( string $achievementId ) : boolean | ||
batchDataPacket ( |
Batch a Data packet into the channel list to send at the end of the tick | |
calcExpLevel ( ) | ||
canCollideWith ( |
||
canInteract ( |
||
canPickupExp ( ) : boolean | ||
canSee ( |
||
checkNetwork ( ) | ||
clearCreativeItems ( ) | ||
close ( string $message = "", string $reason = "generic reason", boolean $notify = true ) | Note for plugin developers: use kick() with the isAdmin flag set to kick without the "Kicked by admin" part instead of this method. | |
dataPacket ( |
Sends an ordered DataPacket to the send buffer | |
directDataPacket ( |
||
dropItem ( |
||
getAddress ( ) : string | Gets the player IP address | |
getAllowFlight ( ) : boolean | ||
getChunkCacheFromData ( $chunkX, $chunkZ, $payload, integer $ordering = FullChunkDataPacket::ORDER_COLUMNS ) : |
||
getClientId ( ) | This might disappear in the future. | |
getClientSecret ( ) | ||
getCreativeItemIndex ( |
||
getCreativeItems ( ) : array | ||
getDisplayName ( ) : string | Gets the "friendly" name to display of this player to use in the chat. | |
getDrops ( ) : array | ||
getEffectivePermissions ( ) : |
||
getExp ( ) | ||
getExpLevel ( ) | ||
getExpectedExperience ( ) | ||
getFirstPlayed ( ) | ||
getFishingHook ( ) | ||
getGamemode ( ) : integer | ||
getInAirTicks ( ) | ||
getItemInHand ( ) | ||
getLastPlayed ( ) | ||
getLeaveMessage ( ) | ||
getLevelUpExpectedExperience ( ) | ||
getLoaderId ( ) | ||
getMetadata ( $metadataKey ) | ||
getName ( ) : string | Gets the username | |
getNextPosition ( ) | ||
getPlayer ( ) | ||
getPort ( ) : integer | ||
getProtocol ( ) | ||
getRemoveFormat ( ) : boolean | ||
getServer ( ) : |
||
getSpawn ( ) : |
||
getWindowId ( pocketmine\inventory\Inventory $inventory ) : integer | ||
handleDataPacket ( |
Handles a Minecraft packet TODO: Separate all of this in handlers | |
hasAchievement ( string $achievementId ) : boolean | ||
hasAutoJump ( ) : boolean | ||
hasMetadata ( $metadataKey ) | ||
hasPermission ( |
||
hasPlayedBefore ( ) | ||
hidePlayer ( |
||
isAdventure ( ) : boolean | ||
isBanned ( ) | ||
isConnected ( ) : boolean | ||
isCreative ( ) : boolean | ||
isFishing ( ) | ||
isLoaderActive ( ) | ||
isMoving ( ) : boolean | ||
isOnline ( ) : boolean | ||
isOp ( ) : boolean | ||
isPermissionSet ( |
||
isSleeping ( ) : boolean | ||
isSpectator ( ) : boolean | ||
isSurvival ( ) : boolean | ||
isWhitelisted ( ) : boolean | ||
kick ( string $reason = "", boolean $isAdmin = true ) : boolean | Kicks a player from the server | |
kill ( ) | ||
linkHookToPlayer ( |
||
onBlockChanged ( |
||
onChunkChanged ( pocketmine\level\format\FullChunk $chunk ) | ||
onChunkLoaded ( pocketmine\level\format\FullChunk $chunk ) | ||
onChunkPopulated ( pocketmine\level\format\FullChunk $chunk ) | ||
onChunkUnloaded ( pocketmine\level\format\FullChunk $chunk ) | ||
onPlayerPreLogin ( ) | ||
onUpdate ( $currentTick ) | ||
recalculatePermissions ( ) | ||
removeAchievement ( string $achievementId ) | ||
removeAttachment ( |
||
removeCreativeItem ( |
||
removeMetadata ( $metadataKey, pocketmine\plugin\Plugin $plugin ) | ||
removeWindow ( pocketmine\inventory\Inventory $inventory ) | ||
resetExpCooldown ( ) | ||
resetFallDistance ( ) | ||
save ( $async = false ) | Handles player data saving | |
sendAttributes ( ) | ||
sendChunk ( $x, $z, $payload, $ordering = FullChunkDataPacket::ORDER_COLUMNS ) | ||
sendMessage ( string | |
Sends a direct chat message to a player | |
sendPopup ( $message, $subtitle = "" ) | ||
sendPosition ( |
||
sendSettings ( ) | Sends all the option flags | |
sendTip ( $message ) : boolean | ||
sendTranslation ( $message, array $parameters = [] ) | ||
setAllowFlight ( $value ) | ||
setAutoJump ( $value ) | ||
setBanned ( $value ) | ||
setDataProperty ( $id, $type, $value ) | ||
setDisplayName ( string $name ) | ||
setExp ( integer $exp ) | ||
setExpLevel ( integer $level ) | ||
setExperienceAndLevel ( integer $exp, integer $level ) | ||
setFishingHook ( |
||
setGamemode ( integer $gm ) : boolean | Sets the gamemode, and if needed, kicks the Player. | |
setHealth ( $amount ) | ||
setMetadata ( $metadataKey, |
||
setMotion ( |
||
setMoving ( $moving ) | ||
setOp ( boolean $value ) | ||
setRemoveFormat ( boolean $remove = true ) | ||
setSkin ( $str, $skinId ) | ||
setSpawn ( |
Sets the spawnpoint of the player (and the compass direction) to a Vector3, or set it on another world with a Position object | |
setWhitelisted ( $value ) | ||
showPlayer ( |
||
sleepOn ( |
||
spawnTo ( |
||
stopSleep ( ) | ||
teleport ( |
||
teleportImmediate ( |
This method may not be reliable. Clients don't like to be moved into unloaded chunks. | |
unlinkHookFromPlayer ( ) | ||
updateExperience ( ) |
Метод | Описание | |
---|---|---|
checkBlockCollision ( ) | ||
checkChunks ( ) | ||
checkGroundState ( $movX, $movY, $movZ, $dx, $dy, $dz ) | ||
checkNearEntities ( $tickDiff ) | ||
checkTeleportPosition ( ) | ||
doFirstSpawn ( ) | ||
orderChunks ( ) | ||
processLogin ( ) | ||
processMovement ( $tickDiff ) | ||
sendNextChunk ( ) | ||
switchLevel ( |
||
updateMovement ( ) |
Метод | Описание | |
---|---|---|
unloadChunk ( $x, $z, |
public addAttachment ( pocketmine\plugin\Plugin $plugin, string $name = null, boolean $value = null ) : |
||
$plugin | pocketmine\plugin\Plugin | |
$name | string | |
$value | boolean | |
Результат |
public attack ( $damage, |
||
$source |
public awardAchievement ( string $achievementId ) : boolean | ||
$achievementId | string | |
Результат | boolean |
public batchDataPacket ( |
||
$packet | ||
Результат | boolean |
public canCollideWith ( |
||
$entity | ||
Результат | boolean |
public canInteract ( |
||
$pos |
protected checkGroundState ( $movX, $movY, $movZ, $dx, $dy, $dz ) |
public dropItem ( |
||
$item | Drops the specified item in front of the player. |
public getAddress ( ) : string | ||
Результат | string |
public static getChunkCacheFromData ( $chunkX, $chunkZ, $payload, integer $ordering = FullChunkDataPacket::ORDER_COLUMNS ) : |
||
$chunkX | ||
$chunkZ | ||
$payload | ||
$ordering | integer | |
Результат |
public getClientId ( ) |
public getCreativeItemIndex ( |
||
$item | ||
Результат | integer |
public getDisplayName ( ) : string | ||
Результат | string |
public getEffectivePermissions ( ) : |
||
Результат |
public getWindowId ( pocketmine\inventory\Inventory $inventory ) : integer | ||
$inventory | pocketmine\inventory\Inventory | |
Результат | integer |
public handleDataPacket ( |
||
$packet |
public hasAchievement ( string $achievementId ) : boolean | ||
$achievementId | string | |
Результат | boolean |
public hasPermission ( |
||
$name | ||
Результат | boolean |
public isPermissionSet ( |
||
$name | ||
Результат | boolean |
public linkHookToPlayer ( |
||
$entity |
public onBlockChanged ( |
||
$block |
public onChunkChanged ( pocketmine\level\format\FullChunk $chunk ) | ||
$chunk | pocketmine\level\format\FullChunk |
public onChunkLoaded ( pocketmine\level\format\FullChunk $chunk ) | ||
$chunk | pocketmine\level\format\FullChunk |
public onChunkPopulated ( pocketmine\level\format\FullChunk $chunk ) | ||
$chunk | pocketmine\level\format\FullChunk |
public onChunkUnloaded ( pocketmine\level\format\FullChunk $chunk ) | ||
$chunk | pocketmine\level\format\FullChunk |
public removeAchievement ( string $achievementId ) | ||
$achievementId | string |
public removeAttachment ( |
||
$attachment | ||
Результат | boolean |
public removeCreativeItem ( |
||
$item |
public removeMetadata ( $metadataKey, pocketmine\plugin\Plugin $plugin ) | ||
$plugin | pocketmine\plugin\Plugin |
public removeWindow ( pocketmine\inventory\Inventory $inventory ) | ||
$inventory | pocketmine\inventory\Inventory |
public sendChunk ( $x, $z, $payload, $ordering = FullChunkDataPacket::ORDER_COLUMNS ) |
public sendMessage ( string | |
||
$message | string | |
|
Результат | boolean |
public sendPosition ( |
||
$pos | ||
$targets | array |
public sendTranslation ( $message, array $parameters = [] ) | ||
$parameters | array |
public setExperienceAndLevel ( integer $exp, integer $level ) | ||
$exp | integer | |
$level | integer |
public setFishingHook ( |
||
$entity |
public setGamemode ( integer $gm ) : boolean | ||
$gm | integer | |
Результат | boolean |
public setMetadata ( $metadataKey, |
||
$metadataValue |
public setSpawn ( |
||
$pos |
protected switchLevel ( |
||
$targetLevel |
public teleportImmediate ( |
||
$pos | ||
$yaw | float | |
$pitch | float |
public FishingHook,pocketmine\entity $fishingHook | ||
Результат |
protected Vector3,pocketmine\math $forceMovement | ||
Результат |
public Vector3,pocketmine\math $fromPos | ||
Результат |
protected SourceInterface,pocketmine\network $interface | ||
Результат | pocketmine\network\SourceInterface |
protected $isCrafting |
protected Vector3,pocketmine\math $newPosition | ||
Результат |
protected Item[],pocketmine\item $personalCreativeItems | ||
Результат |
public Level[],pocketmine\level $selectedLev | ||
Результат |
public Position[],pocketmine\level $selectedPos | ||
Результат |
protected Vector3,pocketmine\math $sleeping | ||
Результат |
protected null|Position,pocketmine\level $spawnPosition | ||
Результат | null | |
protected Vector3,pocketmine\math $teleportPosition | ||
Результат |
protected Inventory[],pocketmine\inventory $windowIndex | ||
Результат | pocketmine\inventory\Inventory[] |