Zig: Players¶
Player¶
One player, named by a selector.
Player.byName¶
| Zig | |
|---|---|
- Parameters:
- sel_name :
[]const u8
- sel_name :
- Return type:
Player
Player.byXuid¶
| Zig | |
|---|---|
- Parameters:
- sel_xuid :
[]const u8
- sel_xuid :
- Return type:
Player
Player.byUuid¶
| Zig | |
|---|---|
- Parameters:
- sel_uuid :
[]const u8
- sel_uuid :
- Return type:
Player
Player.cSel¶
| Zig | |
|---|---|
- Return type:
core.c.PierPlayerSel
Player.executeCommand¶
| Zig | |
|---|---|
Runs cmd as this player, with the player's own permission level. Server thread only. The output lines are logged at debug level; a false from the host, a player who is offline or a level that is not ready, is Refused.
- Parameters:
- cmd :
[]const u8
- cmd :
- Return type:
core.Error!void - Slots:
player_execute_command,log
Player.gameType¶
| Zig | |
|---|---|
PIER_PPROP_GAME_TYPE: (G) Player::getPlayerGameType; write via player_set_gamemode
- Return type:
core.Error!f64 - Slots:
player_get_num
Player.level¶
| Zig | |
|---|---|
PIER_PPROP_LEVEL: (S) attribute Player::LEVEL()
- Return type:
core.Error!f64 - Slots:
player_get_num
Player.setLevel¶
| Zig | |
|---|---|
Writes PIER_PPROP_LEVEL: (S) attribute Player::LEVEL()
- Parameters:
- new_value :
f64
- new_value :
- Return type:
core.Error!void - Slots:
player_set_num
Player.experience¶
| Zig | |
|---|---|
PIER_PPROP_EXPERIENCE: (S) attribute Player::EXPERIENCE() (progress 0..1)
- Return type:
core.Error!f64 - Slots:
player_get_num
Player.setExperience¶
| Zig | |
|---|---|
Writes PIER_PPROP_EXPERIENCE: (S) attribute Player::EXPERIENCE() (progress 0..1)
- Parameters:
- new_value :
f64
- new_value :
- Return type:
core.Error!void - Slots:
player_set_num
Player.hunger¶
| Zig | |
|---|---|
PIER_PPROP_HUNGER: (S) attribute Player::HUNGER()
- Return type:
core.Error!f64 - Slots:
player_get_num
Player.setHunger¶
| Zig | |
|---|---|
Writes PIER_PPROP_HUNGER: (S) attribute Player::HUNGER()
- Parameters:
- new_value :
f64
- new_value :
- Return type:
core.Error!void - Slots:
player_set_num
Player.saturation¶
| Zig | |
|---|---|
PIER_PPROP_SATURATION: (S) attribute Player::SATURATION()
- Return type:
core.Error!f64 - Slots:
player_get_num
Player.setSaturation¶
| Zig | |
|---|---|
Writes PIER_PPROP_SATURATION: (S) attribute Player::SATURATION()
- Parameters:
- new_value :
f64
- new_value :
- Return type:
core.Error!void - Slots:
player_set_num
Player.exhaustion¶
| Zig | |
|---|---|
PIER_PPROP_EXHAUSTION: (S) attribute Player::EXHAUSTION()
- Return type:
core.Error!f64 - Slots:
player_get_num
Player.setExhaustion¶
| Zig | |
|---|---|
Writes PIER_PPROP_EXHAUSTION: (S) attribute Player::EXHAUSTION()
- Parameters:
- new_value :
f64
- new_value :
- Return type:
core.Error!void - Slots:
player_set_num
Player.xpNeededNextLevel¶
| Zig | |
|---|---|
PIER_PPROP_XP_NEEDED_NEXT_LEVEL: (G) Player::getXpNeededForNextLevel
- Return type:
core.Error!f64 - Slots:
player_get_num
Player.luck¶
| Zig | |
|---|---|
PIER_PPROP_LUCK: (G) Player::getLuck
- Return type:
core.Error!f64 - Slots:
player_get_num
Player.selectedSlot¶
| Zig | |
|---|---|
PIER_PPROP_SELECTED_SLOT: (G) Player::getSelectedItemSlot; set via PIER_PACT_SET_SELECTED_SLOT
- Return type:
core.Error!f64 - Slots:
player_get_num
Player.isOperator¶
| Zig | |
|---|---|
PIER_PPROP_IS_OPERATOR: (G) Player::isOperator
- Return type:
core.Error!bool - Slots:
player_get_num
Player.canUseOperatorBlocks¶
| Zig | |
|---|---|
PIER_PPROP_CAN_USE_OPERATOR_BLOCKS: (G) Player::canUseOperatorBlocks
- Return type:
core.Error!bool - Slots:
player_get_num
Player.isFlying¶
| Zig | |
|---|---|
PIER_PPROP_IS_FLYING: (G) Player::isFlying
- Return type:
core.Error!bool - Slots:
player_get_num
Player.canJump¶
| Zig | |
|---|---|
PIER_PPROP_CAN_JUMP: (G) Player::canJump
- Return type:
core.Error!bool - Slots:
player_get_num
Player.isEmoting¶
| Zig | |
|---|---|
PIER_PPROP_IS_EMOTING: (G) Player::isEmoting
- Return type:
core.Error!bool - Slots:
player_get_num
Player.isInRaid¶
| Zig | |
|---|---|
PIER_PPROP_IS_IN_RAID: (G) Player::isInRaid
- Return type:
core.Error!bool - Slots:
player_get_num
Player.isHurt¶
| Zig | |
|---|---|
PIER_PPROP_IS_HURT: (G) Player::isHurt
- Return type:
core.Error!bool - Slots:
player_get_num
Player.isScoping¶
| Zig | |
|---|---|
PIER_PPROP_IS_SCOPING: (G) Player::isScoping
- Return type:
core.Error!bool - Slots:
player_get_num
Player.canSleep¶
| Zig | |
|---|---|
PIER_PPROP_CAN_SLEEP: (G) Player::canSleep
- Return type:
core.Error!bool - Slots:
player_get_num
Player.hasRespawnPosition¶
| Zig | |
|---|---|
PIER_PPROP_HAS_RESPAWN_POSITION: (G) Player::hasRespawnPosition
- Return type:
core.Error!bool - Slots:
player_get_num
Player.clientSubId¶
| Zig | |
|---|---|
PIER_PPROP_CLIENT_SUB_ID: (G) Player::getClientSubId
- Return type:
core.Error!f64 - Slots:
player_get_num
Player.canUseAbility¶
| Zig | |
|---|---|
PIER_PPROP_CAN_USE_ABILITY: (G) Player::canUseAbility; the ability index is passed through the player_action GET path, see PIER_PACT_CAN_USE_ABILITY
- Return type:
core.Error!bool - Slots:
player_get_num
Player.direction¶
| Zig | |
|---|---|
PIER_PPROP_DIRECTION: (G) Player::getDirection (0=S,1=W,2=N,3=E)
- Return type:
core.Error!f64 - Slots:
player_get_num
Player.chunkRadius¶
| Zig | |
|---|---|
PIER_PPROP_CHUNK_RADIUS: (G) Player::getChunkRadius
- Return type:
core.Error!f64 - Slots:
player_get_num
Player.networkRtt¶
| Zig | |
|---|---|
PIER_PPROP_NETWORK_RTT: (G) getNetworkStatus().mPing (ms)
- Return type:
core.Error!f64 - Slots:
player_get_num
Player.platform¶
| Zig | |
|---|---|
PIER_PPROP_PLATFORM: (G) Player::getPlatform
- Return type:
core.Error!f64 - Slots:
player_get_num
Player.enchantmentSeed¶
| Zig | |
|---|---|
PIER_PPROP_ENCHANTMENT_SEED: (G) Player::getEnchantmentSeed
- Return type:
core.Error!f64 - Slots:
player_get_num
Player.isUsingItem¶
| Zig | |
|---|---|
PIER_PPROP_IS_USING_ITEM: (G) Player::isUsingItem
- Return type:
core.Error!bool - Slots:
player_get_num
Player.isBlocking¶
| Zig | |
|---|---|
PIER_PPROP_IS_BLOCKING: (G) Player::isBlocking
- Return type:
core.Error!bool - Slots:
player_get_num
Player.isGliding¶
| Zig | |
|---|---|
PIER_PPROP_IS_GLIDING: (G) Player::isGliding
- Return type:
core.Error!bool - Slots:
player_get_num
Player.isSwimming¶
| Zig | |
|---|---|
PIER_PPROP_IS_SWIMMING: (G) Player::isSwimming
- Return type:
core.Error!bool - Slots:
player_get_num
Player.permissionLevel¶
| Zig | |
|---|---|
PIER_PPROP_PERMISSION_LEVEL: (G) Player::getPlayerPermissionLevel
- Return type:
core.Error!f64 - Slots:
player_get_num
Player.score¶
| Zig | |
|---|---|
PIER_PPROP_SCORE: (G) Player::getScore
- Return type:
core.Error!f64 - Slots:
player_get_num
Player.fallDistance¶
| Zig | |
|---|---|
PIER_PPROP_FALL_DISTANCE: (G) Actor::getFallDistance
- Return type:
core.Error!f64 - Slots:
player_get_num
Player.isDead¶
| Zig | |
|---|---|
PIER_PPROP_IS_DEAD: (G) Actor::isDead
- Return type:
core.Error!bool - Slots:
player_get_num
Player.hasDiedBefore¶
| Zig | |
|---|---|
PIER_PPROP_HAS_DIED_BEFORE: (G) Player::hasDiedBefore
- Return type:
core.Error!bool - Slots:
player_get_num
Player.dimension¶
| Zig | |
|---|---|
PIER_PPROP_DIMENSION: (G) Actor::getDimensionId
- Return type:
core.Error!f64 - Slots:
player_get_num
Player.isInitialized¶
| Zig | |
|---|---|
PIER_PPROP_IS_INITIALIZED: (G) Player::isPlayerInitialized; 1 for a simulated player
- Return type:
core.Error!bool - Slots:
player_get_num
Player.isSleeping¶
| Zig | |
|---|---|
PIER_PPROP_IS_SLEEPING: (G) Player::isSleeping
- Return type:
core.Error!bool - Slots:
player_get_num
Player.isSimulated¶
| Zig | |
|---|---|
PIER_PPROP_IS_SIMULATED: (G) Actor::isSimulatedPlayer
- Return type:
core.Error!bool - Slots:
player_get_num
Player.itemUseDuration¶
| Zig | |
|---|---|
PIER_PPROP_ITEM_USE_DURATION: (G) Player::getItemUseDuration, in ticks
- Return type:
core.Error!f64 - Slots:
player_get_num
Player.xpEarnedAtLevel¶
| Zig | |
|---|---|
PIER_PPROP_XP_EARNED_AT_LEVEL: (G) Player::getXpEarnedAtCurrentLevel
- Return type:
core.Error!f64 - Slots:
player_get_num
Player.canFly¶
| Zig | |
|---|---|
PIER_PPROP_CAN_FLY: (G) Actor::canFly
- Return type:
core.Error!bool - Slots:
player_get_num
Player.realName¶
| Zig | |
|---|---|
PIER_PSTR_REAL_NAME: Player::getRealName
- Parameters:
- allocator :
std.mem.Allocator
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_get_str
Player.uuid¶
| Zig | |
|---|---|
PIER_PSTR_UUID: Player::getUuid().asString()
- Parameters:
- allocator :
std.mem.Allocator
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_get_str
Player.xuid¶
| Zig | |
|---|---|
PIER_PSTR_XUID: Player::getXuid
- Parameters:
- allocator :
std.mem.Allocator
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_get_str
Player.ipAndPort¶
| Zig | |
|---|---|
PIER_PSTR_IP_AND_PORT: Player::getIPAndPort
- Parameters:
- allocator :
std.mem.Allocator
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_get_str
Player.localeCode¶
| Zig | |
|---|---|
PIER_PSTR_LOCALE_CODE: Player::getLocaleCode
- Parameters:
- allocator :
std.mem.Allocator
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_get_str
Player.nameTag¶
| Zig | |
|---|---|
PIER_PSTR_NAME_TAG: Actor::getNameTag (display name)
- Parameters:
- allocator :
std.mem.Allocator
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_get_str
Player.lastDeathPos¶
| Zig | |
|---|---|
PIER_PSTR_LAST_DEATH_POS: SNBT {x,y,z} or "" if none
- Parameters:
- allocator :
std.mem.Allocator
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_get_str
Player.lastDeathDimension¶
| Zig | |
|---|---|
PIER_PSTR_LAST_DEATH_DIMENSION: dimension id as string
- Parameters:
- allocator :
std.mem.Allocator
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_get_str
Player.networkStatus¶
| Zig | |
|---|---|
PIER_PSTR_NETWORK_STATUS: SNBT {ping,avg_ping,packet_loss,max_ping}
- Parameters:
- allocator :
std.mem.Allocator
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_get_str
Player.platformOnlineId¶
| Zig | |
|---|---|
PIER_PSTR_PLATFORM_ONLINE_ID: Player::getPlatformOnlineId
- Parameters:
- allocator :
std.mem.Allocator
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_get_str
Player.respawnPos¶
| Zig | |
|---|---|
PIER_PSTR_RESPAWN_POS: SNBT {x,y,z,dim}: where this player would respawn. Never empty; a player with no bed reports the world spawn, and the two are not distinguishable.
- Parameters:
- allocator :
std.mem.Allocator
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_get_str
Player.selectedItem¶
| Zig | |
|---|---|
PIER_PSTR_SELECTED_ITEM: Player::getSelectedItem as item SNBT
- Parameters:
- allocator :
std.mem.Allocator
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_get_str
Player.deviceModel¶
| Zig | |
|---|---|
PIER_PSTR_DEVICE_MODEL: ConnectionRequest::getDeviceModel; fails for a player with no connection request
- Parameters:
- allocator :
std.mem.Allocator
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_get_str
Player.setAbility¶
| Zig | |
|---|---|
PIER_PACT_SET_ABILITY: a=AbilitiesIndex, b=0/1 (bool slots) or float (FlySpeed etc.). Restores PlayerPermissionLevel to its pre-write value afterwards: the engine's LayeredAbilities::setAbility is the "switch to custom permissions" path and pushes the player to Custom, and that level ships to the client inside UpdateAbilitiesPacket together with the ability layer. To change the level, use PIER_PACT_SET_PERMISSION_LEVEL. Refused (false) until the player has finished joining (Player::isPlayerInitialized): an ability written while the client is still loading desynchronizes until the player rejoins. Simulated players are exempt.
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- allocator :
std.mem.Allocator - s_arg :
[]const u8 - n_a :
f64 - n_b :
f64 - n_c :
f64
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_action
Player.canUseAbilityAction¶
| Zig | |
|---|---|
PIER_PACT_CAN_USE_ABILITY: a=AbilitiesIndex β out "0"/"1" Player::canUseAbility
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- allocator :
std.mem.Allocator - s_arg :
[]const u8 - n_a :
f64 - n_b :
f64 - n_c :
f64
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_action
Player.setSelectedSlot¶
| Zig | |
|---|---|
PIER_PACT_SET_SELECTED_SLOT: a=slot Player::setSelectedSlot
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- allocator :
std.mem.Allocator - s_arg :
[]const u8 - n_a :
f64 - n_b :
f64 - n_c :
f64
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_action
Player.giveItem¶
| Zig | |
|---|---|
PIER_PACT_GIVE_ITEM: sarg=item SNBT ItemStack::fromTag + Player::addAndRefresh
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- allocator :
std.mem.Allocator - s_arg :
[]const u8 - n_a :
f64 - n_b :
f64 - n_c :
f64
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_action
Player.setSpawnPoint¶
| Zig | |
|---|---|
PIER_PACT_SET_SPAWN_POINT: a,b,c=pos, sarg=dim id (any registered dim); native Player::setRespawnPosition
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- allocator :
std.mem.Allocator - s_arg :
[]const u8 - n_a :
f64 - n_b :
f64 - n_c :
f64
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_action
Player.clearTitle¶
| Zig | |
|---|---|
PIER_PACT_CLEAR_TITLE: native SetTitlePacket(Clear)
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- allocator :
std.mem.Allocator - s_arg :
[]const u8 - n_a :
f64 - n_b :
f64 - n_c :
f64
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_action
Player.setTitle¶
| Zig | |
|---|---|
PIER_PACT_SET_TITLE: sarg=text, a=slot(0 title,1 subtitle,2 actionbar); native SetTitlePacket, text sent verbatim
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- allocator :
std.mem.Allocator - s_arg :
[]const u8 - n_a :
f64 - n_b :
f64 - n_c :
f64
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_action
Player.addExperience¶
| Zig | |
|---|---|
PIER_PACT_ADD_EXPERIENCE: a=xp Player::addExperience
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- allocator :
std.mem.Allocator - s_arg :
[]const u8 - n_a :
f64 - n_b :
f64 - n_c :
f64
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_action
Player.addLevels¶
| Zig | |
|---|---|
PIER_PACT_ADD_LEVELS: a=levels Player::addLevels
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- allocator :
std.mem.Allocator - s_arg :
[]const u8 - n_a :
f64 - n_b :
f64 - n_c :
f64
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_action
Player.startCooldown¶
| Zig | |
|---|---|
PIER_PACT_START_COOLDOWN: sarg=item name, a=ticks Player::startItemCooldown
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- allocator :
std.mem.Allocator - s_arg :
[]const u8 - n_a :
f64 - n_b :
f64 - n_c :
f64
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_action
Player.startRiding¶
| Zig | |
|---|---|
PIER_PACT_START_RIDING: a=vehicle ActorUniqueID (lower 64b) Player::startRiding
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- allocator :
std.mem.Allocator - s_arg :
[]const u8 - n_a :
f64 - n_b :
f64 - n_c :
f64
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_action
Player.stopRiding¶
| Zig | |
|---|---|
PIER_PACT_STOP_RIDING: Player::stopRiding
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- allocator :
std.mem.Allocator - s_arg :
[]const u8 - n_a :
f64 - n_b :
f64 - n_c :
f64
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_action
Player.attack¶
| Zig | |
|---|---|
PIER_PACT_ATTACK: a=target ActorUniqueID (lower 64b) Player::attack
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- allocator :
std.mem.Allocator - s_arg :
[]const u8 - n_a :
f64 - n_b :
f64 - n_c :
f64
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_action
Player.drop¶
| Zig | |
|---|---|
PIER_PACT_DROP: sarg=item SNBT, a=random(0/1) Player::drop
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- allocator :
std.mem.Allocator - s_arg :
[]const u8 - n_a :
f64 - n_b :
f64 - n_c :
f64
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_action
Player.interact¶
| Zig | |
|---|---|
PIER_PACT_INTERACT: a=target ActorUniqueID Player::interact
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- allocator :
std.mem.Allocator - s_arg :
[]const u8 - n_a :
f64 - n_b :
f64 - n_c :
f64
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_action
Player.startUsingItem¶
| Zig | |
|---|---|
PIER_PACT_START_USING_ITEM: sarg=item SNBT, a=duration Player::startUsingItem
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- allocator :
std.mem.Allocator - s_arg :
[]const u8 - n_a :
f64 - n_b :
f64 - n_c :
f64
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_action
Player.stopUsingItem¶
| Zig | |
|---|---|
PIER_PACT_STOP_USING_ITEM: Player::stopUsingItem
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- allocator :
std.mem.Allocator - s_arg :
[]const u8 - n_a :
f64 - n_b :
f64 - n_c :
f64
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_action
Player.setChunkRadius¶
| Zig | |
|---|---|
PIER_PACT_SET_CHUNK_RADIUS: a=radius Player::setChunkRadius
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- allocator :
std.mem.Allocator - s_arg :
[]const u8 - n_a :
f64 - n_b :
f64 - n_c :
f64
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_action
Player.setEnchantmentSeed¶
| Zig | |
|---|---|
PIER_PACT_SET_ENCHANTMENT_SEED: a=seed Player::setEnchantmentSeed
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- allocator :
std.mem.Allocator - s_arg :
[]const u8 - n_a :
f64 - n_b :
f64 - n_c :
f64
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_action
Player.registerTrackedBoss¶
| Zig | |
|---|---|
PIER_PACT_REGISTER_TRACKED_BOSS: a=boss ActorUniqueID Player::registerTrackedBoss
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- allocator :
std.mem.Allocator - s_arg :
[]const u8 - n_a :
f64 - n_b :
f64 - n_c :
f64
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_action
Player.unregisterTrackedBoss¶
| Zig | |
|---|---|
PIER_PACT_UNREGISTER_TRACKED_BOSS: a=boss ActorUniqueID Player::unRegisterTrackedBoss
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- allocator :
std.mem.Allocator - s_arg :
[]const u8 - n_a :
f64 - n_b :
f64 - n_c :
f64
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_action
Player.playEmote¶
| Zig | |
|---|---|
PIER_PACT_PLAY_EMOTE: sarg=piece id Player::playEmote
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- allocator :
std.mem.Allocator - s_arg :
[]const u8 - n_a :
f64 - n_b :
f64 - n_c :
f64
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_action
Player.resendAllChunks¶
| Zig | |
|---|---|
PIER_PACT_RESEND_ALL_CHUNKS: Player::resendAllChunks
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- allocator :
std.mem.Allocator - s_arg :
[]const u8 - n_a :
f64 - n_b :
f64 - n_c :
f64
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_action
Player.openInventory¶
| Zig | |
|---|---|
PIER_PACT_OPEN_INVENTORY: Player::openInventory
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- allocator :
std.mem.Allocator - s_arg :
[]const u8 - n_a :
f64 - n_b :
f64 - n_c :
f64
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_action
Player.sidebarSet¶
| Zig | |
|---|---|
PIER_PACT_SIDEBAR_SET: sarg="obj\ntitle\nlineβ¦" per-player sidebar
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- allocator :
std.mem.Allocator - s_arg :
[]const u8 - n_a :
f64 - n_b :
f64 - n_c :
f64
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_action
Player.sidebarClear¶
| Zig | |
|---|---|
PIER_PACT_SIDEBAR_CLEAR: sarg=objective RemoveObjectivePacket
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- allocator :
std.mem.Allocator - s_arg :
[]const u8 - n_a :
f64 - n_b :
f64 - n_c :
f64
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_action
Player.setPermissionLevel¶
| Zig | |
|---|---|
PIER_PACT_SET_PERMISSION_LEVEL: a=PlayerPermissionLevel (0 Visitor, 1 Member, 2 Operator, 3 Custom). LayeredAbilities::setPlayerPermissions plus UpdateAbilitiesPacket. The read side is PIER_PPROP_PERMISSION_LEVEL. Refused until the player has finished joining, like PIER_PACT_SET_ABILITY.
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- allocator :
std.mem.Allocator - s_arg :
[]const u8 - n_a :
f64 - n_b :
f64 - n_c :
f64
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_action
Player.stopSleeping¶
| Zig | |
|---|---|
PIER_PACT_STOP_SLEEPING: a: non-zero wakes forcefully. Player::stopSleepInBed; false when not asleep
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- allocator :
std.mem.Allocator - s_arg :
[]const u8 - n_a :
f64 - n_b :
f64 - n_c :
f64
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_action
Player.causeExhaustion¶
| Zig | |
|---|---|
PIER_PACT_CAUSE_EXHAUSTION: a: amount, positive. Player::causeFoodExhaustion
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- allocator :
std.mem.Allocator - s_arg :
[]const u8 - n_a :
f64 - n_b :
f64 - n_c :
f64
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_action
Player.eat¶
| Zig | |
|---|---|
PIER_PACT_EAT: sarg: item SNBT. Player::eat, the food value of that item
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- allocator :
std.mem.Allocator - s_arg :
[]const u8 - n_a :
f64 - n_b :
f64 - n_c :
f64
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_action
Player.asEntity¶
| Zig | |
|---|---|
Resolves the selector to the player's actor, which gives the calls of Entity. NoAnswer when the player is offline.
- Return type:
core.Error!Entity - Slots:
player_resolve
Player.isOnline¶
| Zig | |
|---|---|
Whether the selector resolves to anyone online now.
- Return type:
bool - Slots:
player_resolve
Player.connId¶
| Zig | |
|---|---|
The connection id of this player, the same number a packet handler sees. NoAnswer when the player is offline or has no network identity.
- Return type:
core.Error!u64 - Slots:
player_conn_id
Player.teleport¶
| Zig | |
|---|---|
Teleports. A custom dimension, with an id of 3 or above, goes through here too, and the host refuses a dimension whose engine instance does not match.
- Parameters:
- dim :
i32 - x :
f64 - y :
f64 - z :
f64
- dim :
- Return type:
core.Error!void - Slots:
player_teleport
Player.sendMessage¶
| Zig | |
|---|---|
- Parameters:
- msg :
[]const u8
- msg :
- Return type:
core.Error!void - Slots:
player_send_message
Player.tell¶
| Zig | |
|---|---|
Sends one message with a given TextPacketType.
- Parameters:
- msg :
[]const u8 - kind :
types.MessageType
- msg :
- Return type:
core.Error!void - Slots:
player_send_message_typed
Player.sendTitle¶
| Zig | |
|---|---|
Sends one title. Only a title, a subtitle or an action bar carries text. times of null leaves the durations to the host.
- Parameters:
- kind :
types.TitleKind - text :
[]const u8 - times :
?types.TitleTimes
- kind :
- Return type:
core.Error!void - Slots:
player_send_title
Player.setGameMode¶
| Zig | |
|---|---|
- Parameters:
- mode :
types.GameMode
- mode :
- Return type:
core.Error!void - Slots:
player_set_gamemode
Player.disconnect¶
| Zig | |
|---|---|
Disconnects the player with a reason the client shows.
- Parameters:
- reason :
[]const u8
- reason :
- Return type:
core.Error!void - Slots:
player_disconnect
Player.item¶
| Zig | |
|---|---|
One inventory slot as item SNBT, owned by the caller.
- Parameters:
- allocator :
std.mem.Allocator - slot :
i32
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_get_item
Player.setItem¶
| Zig | |
|---|---|
Writes one inventory slot. Refresh the container afterwards, or the client keeps showing the old item.
- Parameters:
- slot :
i32 - item_snbt :
[]const u8
- slot :
- Return type:
core.Error!void - Slots:
player_set_item
Player.carriedItem¶
| Zig | |
|---|---|
The item in hand as item SNBT, owned by the caller.
- Parameters:
- allocator :
std.mem.Allocator
- allocator :
- Return type:
core.Error![]u8 - Slots:
player_get_carried_item
Player.equipment¶
| Zig | |
|---|---|
The full equipment set. For the slot numbering see types.EquipSlot.
- Parameters:
- allocator :
std.mem.Allocator
- allocator :
- Return type:
core.Error!types.Owned(types.EquipmentEntry) - Slots:
player_get_equipment
Player.cooldown¶
| Zig | |
|---|---|
How many ticks of cooldown one item has left; null when it is not on cooldown.
- Parameters:
- item_name :
[]const u8
- item_name :
- Return type:
core.Error!?i32 - Slots:
player_get_cooldown
Player.setCooldown¶
| Zig | |
|---|---|
- Parameters:
- item_name :
[]const u8 - ticks :
i32
- item_name :
- Return type:
core.Error!void - Slots:
player_start_cooldown
Player.networkDetail¶
| Zig | |
|---|---|
The network status in detail.
- Parameters:
- allocator :
std.mem.Allocator
- allocator :
- Return type:
core.Error!types.NetworkStatus - Slots:
player_get_network_status
Player.position¶
| Zig | |
|---|---|
The feet position and the dimension. It goes through a dedicated slot and not a property number, because a position needs three numbers and an id at once.
- Parameters:
- allocator :
std.mem.Allocator
- allocator :
- Return type:
core.Error!types.PlayerPosition - Slots:
get_player_position,player_get_str
Player.inventory¶
| Zig | |
|---|---|
- Return type:
container.Container
Player.enderChest¶
| Zig | |
|---|---|
- Return type:
container.Container
Player.armor¶
| Zig | |
|---|---|
- Return type:
container.Container
Player.offhandContainer¶
| Zig | |
|---|---|
- Return type:
container.Container
SelKind¶
How a Player selector names its player. A decision about permissions, money or ownership keys on the xuid: a name can change hands.