|
Genisys
Genisys API 1.9.3
A server software for Minecraft: Pocket Edition with many features
|
Public Member Functions | |
| linkHookToPlayer (FishingHook $entity) | |
| unlinkHookFromPlayer () | |
| isFishing () | |
| getFishingHook () | |
| setFishingHook (FishingHook $entity=null) | |
| getItemInHand () | |
| getLeaveMessage () | |
| getClientId () | |
| getClientSecret () | |
| isBanned () | |
| setBanned ($value) | |
| isWhitelisted () | |
| setWhitelisted ($value) | |
| getPlayer () | |
| getFirstPlayed () | |
| getLastPlayed () | |
| hasPlayedBefore () | |
| setAllowFlight ($value) | |
| getAllowFlight () | |
| setFlying (bool $value) | |
| isFlying () | |
| setAutoJump ($value) | |
| hasAutoJump () | |
| allowMovementCheats () | |
| setAllowMovementCheats (bool $value=false) | |
| allowInstaBreak () | |
| setAllowInstaBreak (bool $value=false) | |
| spawnTo (Player $player) | |
| getServer () | |
| getRemoveFormat () | |
| setRemoveFormat ($remove=true) | |
| canSee (Player $player) | |
| hidePlayer (Player $player) | |
| showPlayer (Player $player) | |
| canCollideWith (Entity $entity) | |
| resetFallDistance () | |
| getViewDistance () | |
| setViewDistance (int $distance) | |
| isOnline () | |
| isOp () | |
| setOp ($value) | |
| isPermissionSet ($name) | |
| hasPermission ($name) | |
| addAttachment (Plugin $plugin, $name=null, $value=null) | |
| removeAttachment (PermissionAttachment $attachment) | |
| recalculatePermissions () | |
| getEffectivePermissions () | |
| sendCommandData () | |
| __construct (SourceInterface $interface, $clientID, $ip, $port) | |
| removeAchievement ($achievementId) | |
| hasAchievement ($achievementId) | |
| isConnected () | |
| getDisplayName () | |
| setDisplayName ($name) | |
| setSkin ($str, $skinId) | |
| getAddress () | |
| getPort () | |
| getNextPosition () | |
| isSleeping () | |
| getInAirTicks () | |
| getSpawn () | |
| hasValidSpawnPosition () | |
| sendChunk ($x, $z, $payload) | |
| batchDataPacket (DataPacket $packet) | |
| dataPacket (DataPacket $packet, $needACK=false) | |
| directDataPacket (DataPacket $packet, $needACK=false) | |
| sleepOn (Vector3 $pos) | |
| setSpawn (Vector3 $pos) | |
| stopSleep () | |
| awardAchievement ($achievementId) | |
| getGamemode () | |
| setGamemode (int $gm, bool $client=false) | |
| sendSettings () | |
| isSurvival () | |
| isCreative () | |
| isSpectator () | |
| isAdventure () | |
| isFireProof () | |
| getDrops () | |
| setDataProperty ($id, $type, $value) | |
| setMotion (Vector3 $mot) | |
| setMoving ($moving) | |
| isMoving () | |
| sendAttributes (bool $sendAll=false) | |
| onUpdate ($currentTick) | |
| checkNetwork () | |
| canInteract (Vector3 $pos, $maxDistance, $maxDiff=0.5) | |
| onPlayerPreLogin () | |
| clearCreativeItems () | |
| getCreativeItems () | |
| addCreativeItem (Item $item) | |
| removeCreativeItem (Item $item) | |
| getCreativeItemIndex (Item $item) | |
| getProtocol () | |
| kick ($reason="", $isAdmin=true) | |
| dropItem (Item $item) | |
| 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=MovePlayerPacket::MODE_NORMAL, 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 (Chunk $chunk) | |
| onChunkLoaded (Chunk $chunk) | |
| onChunkPopulated (Chunk $chunk) | |
| onChunkUnloaded (Chunk $chunk) | |
| onBlockChanged (Vector3 $block) | |
| getLoaderId () | |
| isLoaderActive () | |
| addEffect (Effect $effect) | |
Public Member Functions inherited from Human | |
| getSkinData () | |
| getSkinId () | |
| getUniqueId () | |
| getRawUniqueId () | |
| setSkin ($str, $skinId) | |
| getFood () | |
| setFood (float $new) | |
| getMaxFood () | |
| addFood (float $amount) | |
| getSaturation () | |
| setSaturation (float $saturation) | |
| addSaturation (float $amount) | |
| getExhaustion () | |
| setExhaustion (float $exhaustion) | |
| exhaust (float $amount, int $cause=PlayerExhaustEvent::CAUSE_CUSTOM) | |
| getXpLevel () | |
| setXpLevel (int $level) | |
| addXpLevel (int $level) | |
| takeXpLevel (int $level) | |
| getXpProgress () | |
| setXpProgress (float $progress) | |
| getTotalXp () | |
| setTotalXp (int $xp, bool $syncLevel=false) | |
| addXp (int $xp, bool $syncLevel=false) | |
| takeXp (int $xp, bool $syncLevel=false) | |
| getRemainderXp () | |
| getFilledXp () | |
| recalculateXpProgress () | |
| getXpSeed () | |
| resetXpCooldown () | |
| canPickupXp () | |
| getInventory () | |
| getEnderChestInventory () | |
| getFloatingInventory () | |
| getTransactionQueue () | |
| getAbsorption () | |
| setAbsorption (int $absorption) | |
| entityBaseTick ($tickDiff=1, $EnchantL=0) | |
| getName () | |
| getDrops () | |
| saveNBT () | |
| spawnTo (Player $player) | |
| despawnFrom (Player $player) | |
| close () | |
Public Member Functions inherited from Creature | |
| onUpdate ($tick) | |
| willMove ($distance=36) | |
| attack ($damage, EntityDamageEvent $source) | |
| ifjump (Level $level, Vector3 $v3, $hate=false, $reason=false) | |
| whatBlock (Level $level, $v3) | |
| getMyYaw ($mx, $mz) | |
| getMyPitch (Vector3 $from, Vector3 $to) | |
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, $EnchantL=0) | |
| getDrops () | |
| getLineOfSight ($maxDistance, $maxLength=0, array $transparent=[]) | |
| getTargetBlock ($maxDistance, array $transparent=[]) | |
Public Member Functions inherited from Entity | |
| __construct (Level $level, CompoundTag $nbt) | |
| getDropExpMin () | |
| getDropExpMax () | |
| getNameTag () | |
| isNameTagVisible () | |
| isNameTagAlwaysVisible () | |
| setNameTag ($name) | |
| setNameTagVisible ($value=true) | |
| setNameTagAlwaysVisible ($value=true) | |
| getScale () | |
| setScale (float $value) | |
| isSneaking () | |
| setSneaking ($value=true) | |
| isSprinting () | |
| setSprinting ($value=true) | |
| isImmobile () | |
| setImmobile ($value=true) | |
| getEffects () | |
| removeAllEffects () | |
| removeEffect ($effectId) | |
| getEffect ($effectId) | |
| hasEffect ($effectId) | |
| addEffect (Effect $effect) | |
| getSaveId () | |
| saveNBT () | |
| getViewers () | |
| spawnTo (Player $player) | |
| sendPotionEffects (Player $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 () | |
| getAttributeMap () | |
| getMaxHealth () | |
| setMaxHealth ($amount) | |
| canCollideWith (Entity $entity) | |
| entityBaseTick ($tickDiff=1) | |
| getDirectionVector () | |
| getDirectionPlane () | |
| onUpdate ($currentTick) | |
| scheduleUpdate () | |
| isOnFire () | |
| setOnFire ($seconds) | |
| isFireProof () | |
| getDirection () | |
| extinguish () | |
| canTriggerWalking () | |
| resetFallDistance () | |
| getBoundingBox () | |
| fall ($fallDistance) | |
| handleLavaMovement () | |
| getEyeHeight () | |
| moveFlying () | |
| onCollideWithPlayer (Human $entityPlayer) | |
| getPosition () | |
| getLocation () | |
| isInsideOfPortal () | |
| isInsideOfWater () | |
| isInsideOfSolid () | |
| isInsideOfFire () | |
| fastMove ($dx, $dy, $dz) | |
| move ($dx, $dy, $dz) | |
| getBlocksAround () | |
| setPositionAndRotation (Vector3 $pos, $yaw, $pitch) | |
| setRotation ($yaw, $pitch) | |
| setLocation (Location $pos) | |
| 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) | |
| linkEntity (Entity $entity) | |
| sendLinkedData () | |
| setLinked ($type=0, Entity $entity) | |
| getLinkedEntity () | |
| getLinkedType () | |
| getDataProperty ($id) | |
| getDataPropertyType ($id) | |
| setDataFlag ($propertyId, $id, $value=true, $type=self::DATA_TYPE_LONG) | |
| 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) | |
| add ($x, $y=0, $z=0, $yaw=0, $pitch=0) | |
| getYaw () | |
| getPitch () | |
| fromObjectAdd (Vector3 $pos, $x, $y, $z) | |
| __toString () | |
Public Member Functions inherited from Position | |
| __construct ($x=0, $y=0, $z=0, Level $level=null) | |
| add ($x, $y=0, $z=0) | |
| getLevel () | |
| setLevel (Level $level=null) | |
| isValid () | |
| getSide ($side, $step=1) | |
| __toString () | |
| setComponents ($x, $y, $z) | |
| fromObjectAdd (Vector3 $pos, $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) | |
| fromObjectAdd (Vector3 $pos, $x, $y, $z) | |
| __toString () | |
Public Member Functions inherited from ChunkLoader | |
| getPosition () | |
| getX () | |
| getZ () | |
| getLevel () | |
Data Fields | |
| const | SURVIVAL = 0 |
| const | CREATIVE = 1 |
| const | ADVENTURE = 2 |
| const | SPECTATOR = 3 |
| const | VIEW = Player::SPECTATOR |
| const | CRAFTING_SMALL = 0 |
| const | CRAFTING_BIG = 1 |
| const | CRAFTING_ANVIL = 2 |
| const | CRAFTING_ENCHANT = 3 |
| $playedBefore = false | |
| $spawned = false | |
| $loggedIn = false | |
| $gamemode | |
| $lastBreak | |
| $speed = null | |
| $achievements = [] | |
| $craftingType = self::CRAFTING_SMALL | |
| $creationTime = 0 | |
| $usedChunks = [] | |
| $weatherData = [0, 0, 0] | |
| $fromPos = null | |
| $fishingHook = null | |
| $selectedPos = [] | |
| $selectedLev = [] | |
| $foodTick = 0 | |
| $starvationTick = 0 | |
| $foodUsageTime = 0 | |
Data Fields inherited from Human | |
| const | DATA_PLAYER_FLAG_SLEEP = 1 |
| const | DATA_PLAYER_FLAG_DEAD = 2 |
| const | DATA_PLAYER_FLAGS = 27 |
| const | DATA_PLAYER_BED_POSITION = 29 |
| $width = 0.6 | |
| $length = 0.6 | |
| $height = 1.8 | |
| $eyeHeight = 1.62 | |
Data Fields inherited from Creature | |
| $attackingTick = 0 | |
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_LONG = 7 |
| const | DATA_TYPE_VECTOR3F = 8 |
| const | DATA_FLAGS = 0 |
| const | DATA_VARIANT = 2 |
| const | DATA_COLOUR = 3 |
| const | DATA_NAMETAG = 4 |
| const | DATA_OWNER_EID = 5 |
| const | DATA_AIR = 7 |
| const | DATA_POTION_COLOR = 8 |
| const | DATA_POTION_AMBIENT = 9 |
| const | DATA_LEAD_HOLDER_EID = 38 |
| const | DATA_SCALE = 39 |
| const | DATA_INTERACTIVE_TAG = 40 |
| const | DATA_URL_TAG = 43 |
| const | DATA_MAX_AIR = 44 |
| const | DATA_MARK_VARIANT = 45 |
| const | DATA_BOUNDING_BOX_WIDTH = 54 |
| const | DATA_BOUNDING_BOX_HEIGHT = 55 |
| const | DATA_FUSE_LENGTH = 56 |
| const | DATA_AREA_EFFECT_CLOUD_RADIUS = 61 |
| const | DATA_AREA_EFFECT_CLOUD_WAITING = 62 |
| const | DATA_AREA_EFFECT_CLOUD_PARTICLE_ID = 63 |
| const | DATA_TRADING_PLAYER_EID = 68 |
| 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 |
| const | DATA_FLAG_TEMPTED = 6 |
| const | DATA_FLAG_INLOVE = 7 |
| const | DATA_FLAG_SADDLED = 8 |
| const | DATA_FLAG_POWERED = 9 |
| const | DATA_FLAG_IGNITED = 10 |
| const | DATA_FLAG_BABY = 11 |
| const | DATA_FLAG_CONVERTING = 12 |
| const | DATA_FLAG_CRITICAL = 13 |
| const | DATA_FLAG_CAN_SHOW_NAMETAG = 14 |
| const | DATA_FLAG_ALWAYS_SHOW_NAMETAG = 15 |
| const | DATA_FLAG_IMMOBILE = 16 |
| const | DATA_FLAG_NO_AI = 16 |
| const | DATA_FLAG_SILENT = 17 |
| const | DATA_FLAG_WALLCLIMBING = 18 |
| const | DATA_FLAG_RESTING = 19 |
| const | DATA_FLAG_SITTING = 20 |
| const | DATA_FLAG_ANGRY = 21 |
| const | DATA_FLAG_INTERESTED = 22 |
| const | DATA_FLAG_CHARGED = 23 |
| const | DATA_FLAG_TAMED = 24 |
| const | DATA_FLAG_LEASHED = 25 |
| const | DATA_FLAG_SHEARED = 26 |
| const | DATA_FLAG_GLIDING = 27 |
| const | DATA_FLAG_FALL_FLYING = 27 |
| const | DATA_FLAG_ELDER = 28 |
| const | DATA_FLAG_MOVING = 29 |
| const | DATA_FLAG_BREATHING = 30 |
| const | DATA_FLAG_CHESTED = 31 |
| const | DATA_FLAG_STACKABLE = 32 |
| const | DATA_FLAG_IDLING = 36 |
| const | SOUTH = 0 |
| const | WEST = 1 |
| const | NORTH = 2 |
| const | EAST = 3 |
| $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 | |
| $dropExp = [0, 0] | |
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) | |
| checkNearEntities ($tickDiff) | |
| processMovement ($tickDiff) | |
| updateMovement () | |
| checkTeleportPosition () | |
Protected Member Functions inherited from Human | |
| initEntity () | |
| addAttributes () | |
Protected Member Functions inherited from Living | |
| initEntity () | |
Protected Member Functions inherited from Entity | |
| recalculateEffectColor () | |
| initEntity () | |
| addAttributes () | |
| checkObstruction ($x, $y, $z) | |
| updateMovement () | |
| updateFallState ($distanceThisTick, $onGround) | |
| switchLevel (Level $targetLevel) | |
| checkGroundState ($movX, $movY, $movZ, $dx, $dy, $dz) | |
| checkChunks () | |
Protected Attributes | |
| $interface | |
| $windowCnt = 2 | |
| $windows | |
| $windowIndex = [] | |
| $messageCounter = 2 | |
| $randomClientId | |
| $protocol | |
| $forceMovement = null | |
| $teleportPosition = null | |
| $connected = true | |
| $ip | |
| $removeFormat = false | |
| $port | |
| $username | |
| $iusername | |
| $displayName | |
| $startAction = -1 | |
| $sleeping = null | |
| $clientID = null | |
| $stepHeight = 0.6 | |
| $chunkLoadCount = 0 | |
| $loadQueue = [] | |
| $nextChunkOrderRun = 5 | |
| $hiddenPlayers = [] | |
| $newPosition | |
| $viewDistance = -1 | |
| $chunksPerTick | |
| $spawnThreshold | |
| $inAirTicks = 0 | |
| $startAirTicks = 5 | |
| $autoJump = true | |
| $allowFlight = false | |
| $flying = false | |
| $allowMovementCheats = false | |
| $allowInstaBreak = false | |
| $shouldSendStatus = false | |
| $personalCreativeItems = [] | |
| $lastEnderPearlUse = 0 | |
| $moving = false | |
Protected Attributes inherited from Human | |
| $inventory | |
| $enderChestInventory | |
| $floatingInventory | |
| $transactionQueue = null | |
| $uuid | |
| $rawUUID | |
| $skinId | |
| $skin | |
| $foodTickTimer = 0 | |
| $totalXp = 0 | |
| $xpSeed | |
| $xpCooldown = 0 | |
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 | |
| $attributeMap | |
| $gravity | |
| $drag | |
| $server | |
| $timings | |
| $isPlayer = false | |
| $linkedEntity = null | |
| $linkedType = null | |
| $riding = null | |
| $activatedPressurePlates = [] | |
Additional Inherited Members | |
Static Public Member Functions inherited from Human | |
| static | getTotalXpRequirement (int $level) |
| static | getLevelXpRequirement (int $level) |
| static | getLevelFromXp (int $xp) |
Static Public Member Functions inherited from Entity | |
| static | init () |
| static | createEntity ($type, Level $level, CompoundTag $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 (int $side) |
| static | createRandomDirection (Random $random) |
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 | |
| int | $port |
| addAttachment | ( | Plugin | $plugin, |
$name = null, |
|||
$value = null |
|||
| ) |
| addEffect | ( | Effect | $effect | ) |
| Effect |
| 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 |
| dropItem | ( | Item | $item | ) |
| Item | $item | Drops the specified item in front of the player. |
| getAddress | ( | ) |
Gets the player IP address
| 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.
| hasValidSpawnPosition | ( | ) |
| 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 | ( | Chunk | $chunk | ) |
This method will be called when a Chunk is replaced by a new one
| Chunk | $chunk |
Implements ChunkLoader.
| onChunkLoaded | ( | Chunk | $chunk | ) |
This method will be called when a registered chunk is loaded
| Chunk | $chunk |
Implements ChunkLoader.
| onChunkPopulated | ( | Chunk | $chunk | ) |
This method will be called when a registered chunk is populated Usually it'll be sent with another call to onChunkChanged()
| Chunk | $chunk |
Implements ChunkLoader.
| onChunkUnloaded | ( | Chunk | $chunk | ) |
This method will be called when a registered chunk is unloaded
| Chunk | $chunk |
Implements ChunkLoader.
| recalculatePermissions | ( | ) |
Implements Permissible.
| removeAchievement | ( | $achievementId | ) |
| string | $achievementId |
| removeAttachment | ( | PermissionAttachment | $attachment | ) |
| 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
| bool | $async |
| sendMessage | ( | $message | ) |
Sends a direct chat message to a player
| string | TextContainer | $message |
Implements CommandSender.
| sendSettings | ( | ) |
Sends all the option flags
| sendTip | ( | $message | ) |
| $message |
| setBanned | ( | $banned | ) |
| bool | $banned |
Implements IPlayer.
| setDisplayName | ( | $name | ) |
| string | $name |
| setGamemode | ( | int | $gm, |
| bool | $client = false |
||
| ) |
Sets the gamemode, and if needed, kicks the Player.
| int | $gm | |
| bool | $client | if the client made this change in their GUI |
| 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 |