메소드 |
설명 |
|
__construct ( pocketmine\network\SourceInterface $interface, null $clientID, string $ip, integer $port ) |
|
|
__debugInfo ( ) |
|
|
addAttachment ( pocketmine\plugin\Plugin $plugin, string $name = null, boolean $value = null ) : PermissionAttachment |
|
|
addCreativeItem ( Item $item ) |
|
|
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, EntityDamageEvent $source ) |
|
|
awardAchievement ( string $achievementId ) : boolean |
|
|
batchDataPacket ( DataPacket $packet ) : boolean |
Batch a Data packet into the channel list to send at the end of the tick |
|
calcExpLevel ( ) |
|
|
canCollideWith ( Entity $entity ) : boolean |
|
|
canInteract ( Vector3 $pos, $maxDistance, $maxDiff = 0.5 ) |
|
|
canPickupExp ( ) : boolean |
|
|
canSee ( Player $player ) : boolean |
|
|
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 ( DataPacket $packet, boolean $needACK = false ) : integer | boolean |
Sends an ordered DataPacket to the send buffer |
|
directDataPacket ( DataPacket $packet, boolean $needACK = false ) : boolean | integer |
|
|
dropItem ( Item $item ) |
|
|
getAddress ( ) : string |
Gets the player IP address |
|
getAllowFlight ( ) : boolean |
|
|
getChunkCacheFromData ( $chunkX, $chunkZ, $payload, integer $ordering = FullChunkDataPacket::ORDER_COLUMNS ) : BatchPacket | FullChunkDataPacket |
|
|
getClientId ( ) |
This might disappear in the future. |
|
getClientSecret ( ) |
|
|
getCreativeItemIndex ( Item $item ) : integer |
|
|
getCreativeItems ( ) : array |
|
|
getDisplayName ( ) : string |
Gets the "friendly" name to display of this player to use in the chat. |
|
getDrops ( ) : array |
|
|
getEffectivePermissions ( ) : PermissionAttachmentInfo[] |
|
|
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 ( ) : Server |
|
|
getSpawn ( ) : Position |
|
|
getWindowId ( pocketmine\inventory\Inventory $inventory ) : integer |
|
|
handleDataPacket ( DataPacket $packet ) |
Handles a Minecraft packet
TODO: Separate all of this in handlers |
|
hasAchievement ( string $achievementId ) : boolean |
|
|
hasAutoJump ( ) : boolean |
|
|
hasMetadata ( $metadataKey ) |
|
|
hasPermission ( Permission | string $name ) : boolean |
|
|
hasPlayedBefore ( ) |
|
|
hidePlayer ( Player $player ) |
|
|
isAdventure ( ) : boolean |
|
|
isBanned ( ) |
|
|
isConnected ( ) : boolean |
|
|
isCreative ( ) : boolean |
|
|
isFishing ( ) |
|
|
isLoaderActive ( ) |
|
|
isMoving ( ) : boolean |
|
|
isOnline ( ) : boolean |
|
|
isOp ( ) : boolean |
|
|
isPermissionSet ( Permission | string $name ) : boolean |
|
|
isSleeping ( ) : boolean |
|
|
isSpectator ( ) : boolean |
|
|
isSurvival ( ) : boolean |
|
|
isWhitelisted ( ) : boolean |
|
|
kick ( string $reason = "", boolean $isAdmin = true ) : boolean |
Kicks a player from the server |
|
kill ( ) |
|
|
linkHookToPlayer ( FishingHook $entity ) |
|
|
onBlockChanged ( Vector3 $block ) |
|
|
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 ( PermissionAttachment $attachment ) : boolean |
|
|
removeCreativeItem ( Item $item ) |
|
|
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 | TextContainer $message ) : boolean |
Sends a direct chat message to a player |
|
sendPopup ( $message, $subtitle = "" ) |
|
|
sendPosition ( Vector3 $pos, $yaw = null, $pitch = null, $mode, array $targets = null ) |
|
|
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 ( FishingHook $entity = null ) |
|
|
setGamemode ( integer $gm ) : boolean |
Sets the gamemode, and if needed, kicks the Player. |
|
setHealth ( $amount ) |
|
|
setMetadata ( $metadataKey, MetadataValue $metadataValue ) |
|
|
setMotion ( Vector3 $mot ) |
|
|
setMoving ( $moving ) |
|
|
setOp ( boolean $value ) |
|
|
setRemoveFormat ( boolean $remove = true ) |
|
|
setSkin ( $str, $skinId ) |
|
|
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 |
|
setWhitelisted ( $value ) |
|
|
showPlayer ( Player $player ) |
|
|
sleepOn ( Vector3 $pos ) : boolean |
|
|
spawnTo ( Player $player ) |
|
|
stopSleep ( ) |
|
|
teleport ( Vector3 $pos, float $yaw = null, float $pitch = null ) : boolean |
|
|
teleportImmediate ( Vector3 $pos, float $yaw = null, float $pitch = null ) |
This method may not be reliable. Clients don't like to be moved into unloaded chunks. |
|
unlinkHookFromPlayer ( ) |
|
|
updateExperience ( ) |
|
|