Başvuru
Bu sayfa İngilizce gösteriliyor.
player
Players, Java and Bedrock player handles, kicks, bans, links, client details and login-gate admission.
Declarations from the script contract strawberry:plugin, version 0.2.0, without source comments.
Bans without a reason. As on Paper, ban and ban-ip with no reason, or with a blank one, keep no reason: the ban list entry's reason is then empty (see server).
WIT declarations
use common.{hand, position, game-mode, block-pos, entity-pose};
use item-stack.{item-stack};
use %world.{%world, entity, equipment-slot, equipment-viewers, ray-trace-block-result, ray-trace-entity-result};
use text.{text-component};
use permission.{permission-level};
use gui.{gui, player-part};
use forms.{form};
use java-dialogs.{dialog, dialog-extras};
use java-packets.{clientbound-packet as java-packet};
use bedrock-packets.{clientbound-packet as bedrock-packet};
use uuid.{uuid};
use status-effect.{status-effect-type, status-effect-instance, named-effect};
use scoreboard.{scoreboard, bedrock-scoreboard};
use advancement.{advancement-progress, frame-type};
use damage-types.{damage-type};
use statistics.{statistic-category, custom-statistic};
use inventory.{inventory, player-inventory};
use sounds.{sound, sound-category};
use particles.{particle, particle-options};
use entity-statuses.{entity-status};
use screens.{screen};
variant open-window-kind {
own-inventory,
screen(screen),
mount,
other,
}
enum window-part {
top,
bottom,
}
record window-slot {
part: window-part,
slot: u16,
}
variant join-target {
friend(uuid),
}
enum world-change-error {
world-full,
}
enum build-action {
place,
%break,
%use,
}
enum build-refusal {
server-rule,
protection-plugin,
not-loaded,
not-in-world,
nested,
}
record reconfigure-pack {
id: uuid,
url: string,
hash: string,
required: bool,
prompt: option<text-component>,
}
enum reconfigure-error {
already-running,
cooling-down,
joining,
not-in-play,
bedrock,
}
enum verification {
premium,
password,
none,
proxy,
}
enum transfer-label-error {
label-too-long,
frame-too-large,
}
enum transfer-refusal {
label-too-long,
frame-too-large,
bedrock,
bedrock-host,
}
enum player-weather {
clear,
downfall,
}
enum projectile-type {
arrow,
snowball,
egg,
ender-pearl,
splash-potion,
fireball,
small-fireball,
trident,
wind-charge,
}
enum client-game-event {
no-respawn-block-available,
begin-raining,
end-raining,
change-game-mode,
win-game,
demo-event,
arrow-hit-player,
rain-level-change,
thunder-level-change,
play-pufferfish-string-sound,
play-elder-guardian-mob-appearance,
enabled-respawn-screen,
limited-crafting,
start-waiting-chunks,
}
enum known-server-link {
bug-report,
community-guidelines,
support,
status,
feedback,
community,
website,
forums,
news,
announcements,
}
variant server-link-label {
known(known-server-link),
custom(text-component),
}
record server-link {
label: server-link-label,
url: string,
}
record player-abilities {
invulnerable: bool,
flying: bool,
allow-flying: bool,
creative: bool,
allow-modify-world: bool,
fly-speed: f32,
walk-speed: f32,
}
record player-skin {
value: string,
signature: option<string>,
}
flags skin-parts {
cape,
jacket,
left-sleeve,
right-sleeve,
left-pants-leg,
right-pants-leg,
hat,
}
enum bedrock-ability {
build,
mine,
doors-and-switches,
open-containers,
attack-players,
attack-mobs,
operator-commands,
teleport,
invulnerable,
flying,
may-fly,
instabuild,
lightning,
fly-speed,
walk-speed,
muted,
world-builder,
no-clip,
privileged-builder,
vertical-fly-speed,
}
enum bedrock-status-flag {
on-fire,
sneaking,
riding,
sprinting,
using-item,
invisible,
tempted,
in-love,
saddled,
powered,
ignited,
baby,
converting,
critical,
show-name,
always-show-name,
no-ai,
silent,
wall-climbing,
climb,
swim,
fly,
walk,
resting,
sitting,
angry,
interested,
charged,
tamed,
orphaned,
leashed,
sheared,
gliding,
elder,
moving,
breathing,
chested,
stackable,
show-bottom,
standing,
shaking,
idling,
casting,
charging,
keyboard-controlled,
power-jump,
dash,
lingering,
has-collision,
has-gravity,
fire-immune,
dancing,
enchanted,
return-trident,
container-private,
transforming,
damage-nearby-mobs,
swimming,
bribed,
pregnant,
laying-egg,
passenger-can-pick,
transition-sitting,
eating,
laying-down,
sneezing,
trusting,
rolling,
scared,
in-scaffolding,
over-scaffolding,
descend-through-block,
blocking,
transition-blocking,
blocked-using-shield,
blocked-using-damaged-shield,
sleeping,
wants-to-wake,
trade-interest,
door-breaker,
breaking-obstruction,
door-opener,
captain,
stunned,
roaring,
delayed-attack,
avoiding-mobs,
avoiding-block,
facing-target-to-range-attack,
hidden-when-invisible,
in-ui,
stalking,
emoting,
celebrating,
admiring,
celebrating-special,
out-of-control,
ram-attack,
playing-dead,
in-ascending-block,
over-descending-block,
croaking,
digest-mob,
jump-goal,
emerging,
sniffing,
digging,
sonic-boom,
has-dash-timeout,
push-towards-closest-space,
scenting,
rising,
feeling-happy,
searching,
crawling,
body-rotation-blocked,
render-when-invisible,
body-rotation-axis-aligned,
collidable,
wasd-air-controlled,
does-server-auth-only-dismount,
body-rotation-always-follows-head,
can-use-vertical-movement-action,
rotation-locked-to-vehicle,
}
enum java-minecraft-version {
v-1-7-2,
v-1-7-6,
v-1-8,
v-1-9,
v-1-9-1,
v-1-9-2,
v-1-9-3,
v-1-10,
v-1-11,
v-1-11-1,
v-1-12,
v-1-12-1,
v-1-12-2,
v-1-13,
v-1-13-1,
v-1-13-2,
v-1-14,
v-1-14-1,
v-1-14-2,
v-1-14-3,
v-1-14-4,
v-1-15,
v-1-15-1,
v-1-15-2,
v-1-16,
v-1-16-1,
v-1-16-2,
v-1-16-3,
v-1-16-4,
v-1-17,
v-1-17-1,
v-1-18,
v-1-18-2,
v-1-19,
v-1-19-1,
v-1-19-3,
v-1-19-4,
v-1-20,
v-1-20-2,
v-1-20-3,
v-1-20-5,
v-1-21,
v-1-21-2,
v-1-21-4,
v-1-21-5,
v-1-21-6,
v-1-21-7,
v-1-21-9,
v-1-21-11,
v-26-1,
v-26-2,
v-26-3,
unknown,
}
enum bedrock-minecraft-version {
v-1-21,
v-1-26-30,
unknown,
}
record java-player-settings {
locale: string,
view-distance: u8,
chat-mode: chat-mode,
chat-colors: bool,
skin-parts: skin-parts,
main-hand: hand,
text-filtering: bool,
server-listing: bool,
}
enum chat-mode {
enabled,
commands-only,
hidden,
}
enum bedrock-device-os {
android,
ios,
osx,
amazon,
gear-vr,
holo-lens,
windows-10,
win-32,
dedicated,
tv-os,
playstation,
nintendo,
xbox,
windows-phone,
linux,
unknown,
}
enum bedrock-input-mode {
unknown,
mouse,
touch,
game-pad,
motion-controller,
}
enum bedrock-ui-profile {
classic,
pocket,
unknown,
}
enum bedrock-graphics-mode {
simple,
fancy,
ray-traced,
unknown,
}
record bedrock-player-settings {
game-version: string,
device-os: bedrock-device-os,
device-id: string,
device-model: string,
language-code: string,
current-input-mode: bedrock-input-mode,
default-input-mode: bedrock-input-mode,
ui-profile: bedrock-ui-profile,
gui-scale: s32,
is-editor-mode: bool,
max-view-distance: s32,
memory-tier: s32,
graphics-mode: bedrock-graphics-mode,
playfab-id: string,
client-random-id: s64,
platform-offline-id: string,
platform-online-id: string,
skin-id: string,
arm-size: string,
is-persona-skin: bool,
is-premium-skin: bool,
is-trusted-skin: bool,
}
enum bedrock-disconnect-reason {
unknown,
cant-connect-no-internet,
no-permissions,
unrecoverable-error,
third-party-blocked,
third-party-no-internet,
third-party-bad-ip,
third-party-no-server-or-server-locked,
version-mismatch,
skin-issue,
invite-session-not-found,
edu-level-settings-missing,
local-server-not-found,
legacy-disconnect,
user-leave-game-attempted,
platform-locked-skins-error,
realms-world-unassigned,
realms-server-cant-connect,
realms-server-hidden,
realms-server-disabled-beta,
realms-server-disabled,
cross-platform-disabled,
cant-connect,
session-not-found,
client-settings-incompatible-with-server,
server-full,
invalid-platform-skin,
edition-version-mismatch,
edition-mismatch,
level-newer-than-exe-version,
no-fail-occurred,
banned-skin,
timeout,
server-not-found,
outdated-server,
outdated-client,
no-premium-platform,
multiplayer-disabled,
no-wifi,
world-corruption,
no-reason,
disconnected,
invalid-player,
logged-in-other-location,
server-id-conflict,
not-allowed,
not-authenticated,
invalid-tenant,
unknown-packet,
unexpected-packet,
invalid-command-request-packet,
host-suspended,
login-packet-no-request,
login-packet-no-cert,
missing-client,
kicked,
kicked-for-exploit,
kicked-for-idle,
resource-pack-problem,
incompatible-pack,
out-of-storage,
invalid-level,
disconnect-packet,
block-mismatch,
invalid-heights,
invalid-widths,
connection-lost,
zombie-connection,
shutdown,
reason-not-set,
loading-state-timeout,
resource-pack-loading-failed,
searching-for-session-loading-screen-failed,
nether-net-protocol-version,
subsystem-status-error,
empty-auth-from-discovery,
empty-url-from-discovery,
expired-auth-from-discovery,
unknown-signal-service-sign-in-failure,
xbl-join-lobby-failure,
unspecified-client-instance-disconnection,
nether-net-session-not-found,
nether-net-create-peer-connection,
nether-net-ice,
nether-net-connect-request,
nether-net-connect-response,
nether-net-negotiation-timeout,
nether-net-inactivity-timeout,
stale-connection-being-replaced,
realms-session-not-found,
bad-packet,
nether-net-failed-to-create-offer,
nether-net-failed-to-create-answer,
nether-net-failed-to-set-local-description,
nether-net-failed-to-set-remote-description,
nether-net-negotiation-timeout-waiting-for-response,
nether-net-negotiation-timeout-waiting-for-accept,
nether-net-incoming-connection-ignored,
nether-net-signaling-parsing-failure,
nether-net-signaling-unknown-error,
nether-net-signaling-unicast-delivery-failed,
nether-net-signaling-broadcast-delivery-failed,
nether-net-signaling-generic-delivery-failed,
editor-mismatch-editor-world,
editor-mismatch-vanilla-world,
world-transfer-not-primary-client,
request-server-shutdown,
client-game-setup-cancelled,
client-game-setup-failed,
no-venue,
nether-net-signaling-signin-failed,
session-access-denied,
service-signin-issue,
nether-net-no-signaling-channel,
nether-net-not-logged-in,
nether-net-client-signaling-error,
sub-client-login-disabled,
deep-link-trying-to-open-demo-world-while-signed-in,
async-join-task-denied,
realms-timeline-required,
guest-without-host,
failed-to-join-experience,
nether-net-data-channel-closed,
discovery-environment-mismatch,
host-without-keys,
host-signed-out,
script-watchdog-exception,
script-memory-limit-exceeded,
storage-low-during-gameplay,
storage-full-during-gameplay,
level-storage-corruption,
edition-mismatch-vanilla-to-edu,
edition-mismatch-edu-to-vanilla,
editor-mismatch-editor-to-vanilla,
editor-mismatch-vanilla-to-editor,
deny-listed,
nonce-missing,
nonce-not-found,
nonce-expired,
nonce-not-valid,
host-disconnected,
editor-join-intent-policy-failure,
nether-net-identity-not-allowed,
invalid-name,
expired-token,
host-accepts-no-type-of-auth,
not-authenticated-fast-fail,
editor-not-allowed,
}
enum socket-teardown-policy {
graceful,
immediate-close,
drop-connection,
}
record java-kick-options {
reason: text-component,
log-to-console: bool,
teardown-policy: socket-teardown-policy,
}
record bedrock-kick-options {
reason: bedrock-disconnect-reason,
message: string,
skip-message: bool,
filtered-message: string,
log-to-console: bool,
teardown-policy: socket-teardown-policy,
}
record ban-player-options {
reason: option<text-component>,
source: option<string>,
expires-at-utc: option<string>,
duration-seconds: option<u64>,
kick-if-online: bool,
log-to-console: bool,
}
type ip-ban-id = string;
record ban-ip-options {
reason: option<text-component>,
source: option<string>,
expires-at-utc: option<string>,
duration-seconds: option<u64>,
kick-matching-players: bool,
log-to-console: bool,
}
record ui-area {
x: u16,
y: u16,
width: u16,
height: u16,
}
enum ui-pointer-kind {
move,
down,
up,
dismissed,
ended,
}
enum ui-button {
left,
right,
middle,
}
record ui-pointer-event {
page: u32,
kind: ui-pointer-kind,
button: ui-button,
x: u16,
y: u16,
}
enum ui-element-kind {
block,
text,
button,
image,
input,
}
enum ui-align {
left,
center,
right,
}
record ui-input {
id: string,
max: u16,
placeholder: string,
}
record ui-element {
id: string,
kind: ui-element-kind,
x: s32,
y: s32,
width: u32,
height: u32,
layer: u32,
background: option<u32>,
hover: option<u32>,
text: option<string>,
color: option<u32>,
size: option<f32>,
align: option<ui-align>,
visible: bool,
enabled: bool,
image: option<string>,
input: option<ui-input>,
submit: bool,
}
record ui-screen {
page: string,
can-close: bool,
dim: bool,
title: string,
elements: list<ui-element>,
}
record ui-screen-set {
element: string,
text: option<string>,
color: option<u32>,
background: option<u32>,
hover: option<u32>,
visible: option<bool>,
enabled: option<bool>,
}
enum ui-animation-trigger {
open,
hover,
click,
}
record ui-look {
x: option<s32>,
y: option<s32>,
width: option<u32>,
height: option<u32>,
background: option<u32>,
opacity: option<f32>,
text: option<string>,
}
record ui-animation {
element: string,
on: ui-animation-trigger,
ticks: u32,
delay: u32,
repeat: bool,
%from: ui-look,
to: ui-look,
}enum ui-screen-event-kind {
click,
closed,
submit,
}
enum ui-close-reason {
player,
replaced,
death,
%world,
quiet,
disconnect,
}
record ui-screen-event {
screen: u32,
kind: ui-screen-event-kind,
element: option<string>,
button: ui-button,
reason: option<ui-close-reason>,
values: list<tuple<string, string>>,
}
resource friends-count-job {
poll: func() -> option<result<option<u32>, string>>;
}
resource player {
as-entity: func () -> entity;
get-id: func () -> uuid;
get-name: func () -> string;
get-position: func () -> position;
get-yaw: func() -> f32;
get-pitch: func() -> f32;
get-world: func () -> %world;
get-gamemode: func () -> game-mode;
set-gamemode: func (mode: game-mode) -> bool;
break-block: func(pos: block-pos) -> bool;
get-locale: func () -> string;
get-ping: func () -> u32;
get-permission-level: func () -> permission-level;
set-permission-level: func (level: permission-level);
update-commands: func();
has-permission-set: func(node: string) -> option<bool>;
set-permission: func(node: string, value: bool);
unset-permission: func(node: string);
has-permission: func (node: string) -> bool;
perform-command: func(command: string) -> bool;
verification: func () -> verification;
is-admitted: func () -> bool;
arrived-by-move: func () -> bool;
admit: func () -> result<_, string>;
revoke-admission: func () -> result<_, string>;
reconfigure: func(packs: option<list<reconfigure-pack>>) -> result<_, reconfigure-error>;
get-display-name: func () -> text-component;
set-display-name: func (display-name: text-component);
set-cosmetics-hidden: func(viewers: equipment-viewers, hidden: bool) -> result<_, string>;
get-cosmetics-hidden: func(viewer: uuid) -> bool;
get-tab-list-name: func() -> option<text-component>;
set-tab-list-name: func(name: option<text-component>);
send-system-message: func (text: text-component, overlay: bool);
delete-message-by-signature: func (signature: list<u8>);
delete-message-by-id: func (signature-id: s32);
set-tab-list-header-footer: func (header: text-component, footer: text-component);
set-tab-list-order: func (order: s32);
set-tab-list-latency: func (latency: s32);
set-tab-list-listed: func (listed: bool);
show-title: func (text: text-component);
show-subtitle: func (text: text-component);
show-actionbar: func (text: text-component);
send-title-animation: func (fade-in: s32, stay: s32, fade-out: s32);
set-camera: func (entity: option<entity>);
set-camera-entity-id: func (entity-id: u32);
get-camera-entity-id: func () -> u32;
reset-camera: func ();
play-sound: func(sound: sound, category: sound-category, volume: f32, pitch: f32);
play-sound-at: func(pos: position, sound: sound, category: sound-category, volume: f32, pitch: f32);
stop-sound: func(sound: option<sound>, category: option<sound-category>);
play-custom-sound: func(sound-name: string, category: sound-category, volume: f32, pitch: f32);
play-custom-sound-at: func(pos: position, sound-name: string, category: sound-category, volume: f32, pitch: f32);
stop-custom-sound: func(sound-name: option<string>, category: option<sound-category>);
play-sound-on-entity: func(entity: borrow<entity>, sound: sound, category: sound-category, volume: f32, pitch: f32) -> result<_, string>;
play-custom-sound-on-entity: func(entity: borrow<entity>, sound-name: string, category: sound-category, volume: f32, pitch: f32) -> result<_, string>;
spawn-particles: func(particle: particle, pos: position, count: u32, offset: position, max-speed: f32);
spawn-particles-with-options: func(options: particle-options, pos: position, count: u32, offset: position, max-speed: f32, long-distance: bool, always-show: bool) -> result<_, string>;
send-block-change: func(pos: block-pos, block-id: u16);
reset-block-change: func(pos: block-pos);
send-equipment-change: func(entity: borrow<entity>, changes: list<tuple<equipment-slot, item-stack>>);
send-biome-change: func(%from: block-pos, to: block-pos, biome: string) -> result<_, string>;
reset-biome-change: func(%from: block-pos, to: block-pos);
send-hurt-animation: func(yaw: f32);
open-book: func(hand: hand);
open-sign-editor: func(pos: block-pos, is-front-text: bool);
set-velocity: func(velocity: position);
apply-knockback: func(strength: f64, x: f64, z: f64);
set-movement-locked: func(locked: bool);
is-movement-locked: func() -> bool;
set-freeze-ticks: func(ticks: s32);
get-freeze-ticks: func() -> s32;
set-server-links: func(links: list<server-link>);
teleport: func(position: position, yaw: option<f32>, pitch: option<f32>, %world: %world);
teleport-world: func (world-ref: %world, position: position, yaw: option<f32>, pitch: option<f32>);
change-world: func (world-ref: %world, position: position, yaw: option<f32>, pitch: option<f32>) -> result<_, world-change-error>;
group: func() -> string;
join-target: func() -> option<join-target>;
friends-count: func() -> friends-count-job;
set-spawn-world: func(world-ref: borrow<%world>) -> result<_, string>;
respawn: func ();
open-gui: func (gui-ref: gui);
open-inventory: func (inventory-ref: borrow<inventory>, %type: screen, title: borrow<text-component>, allow-grab-items: bool, allow-put-items: bool) -> result<_, string>;
set-open-window-title: func(title: text-component, showing: option<borrow<inventory>>) -> bool;
set-open-window-player-part: func(part: player-part, showing: option<borrow<inventory>>) -> bool;
open-window-type: func() -> open-window-kind;
open-window-slot-count: func() -> u16;
open-window-top-slot-count: func() -> u16;
open-window-slot: func(raw-slot: s16) -> option<window-slot>;
open-window-item: func(raw-slot: s16) -> option<item-stack>;
set-open-window-item: func(raw-slot: s16, item: option<item-stack>) -> bool;
cursor-item: func() -> option<item-stack>;
set-cursor-item: func(item: option<item-stack>) -> bool;
ban: func (options: ban-player-options);
ban-ip: func (options: ban-ip-options);
try-ban-ip: func (options: ban-ip-options, protect: option<string>) -> result<ip-ban-id, string>;
transfer: func (host: string, port: u16);
transfer-labeled: func (host: string, port: u16, label: option<text-component>) -> result<_, transfer-label-error>;
transfer-checked: func (host: string, port: u16, label: option<string>) -> result<_, transfer-refusal>;
transfer-sent: func () -> bool;
add-effect: func(effect: status-effect-instance);
remove-effect: func(effect: status-effect-type);
clear-effects: func();
has-effect: func(effect: status-effect-type) -> bool;
get-effect: func(effect: status-effect-type) -> option<status-effect-instance>;
get-active-effects: func() -> list<status-effect-instance>;
add-named-effect: func(effect: named-effect) -> result<_, string>;
remove-named-effect: func(key: string) -> result<_, string>;
get-named-effect: func(key: string) -> result<option<named-effect>, string>;
get-named-effects: func() -> list<named-effect>;
show-effect: func(target: s32, effect: named-effect) -> result<_, string>;
hide-effect: func(target: s32, key: string) -> result<_, string>;
get-shown-effects: func(target: s32) -> list<named-effect>;
add-post-effect: func(id: string) -> result<_, string>;
remove-post-effect: func(id: string);
clear-post-effects: func();
get-post-effects: func() -> list<string>;
set-screen-tint: func(color: u32, strength: f32) -> result<_, string>;
clear-screen-tint: func();
get-screen-tint: func() -> option<tuple<u32, f32>>;
ui-pointer-capable: func() -> bool;
open-ui-page: func(area: ui-area) -> result<u32, string>;
update-ui-page: func(page: u32, area: ui-area) -> bool;
close-ui-page: func(page: u32) -> bool;
ui-screen-capable: func() -> bool;
open-ui-screen: func(screen: ui-screen) -> result<u32, string>;
open-ui-screen-animated: func(screen: ui-screen, animations: list<ui-animation>) -> result<u32, string>;
ui-screen-animations-capable: func() -> bool;
update-ui-screen: func(screen: u32, set: list<ui-screen-set>) -> bool;
close-ui-screen: func(screen: u32) -> bool;
claim-advancements-key: func(claimed: bool) -> bool;
heal: func(amount: f32);
damage: func(amount: f32, damage-type: damage-type);
kill: func();
get-statistic: func(category: statistic-category, stat-id: s32) -> s32;
set-statistic: func(category: statistic-category, stat-id: s32, value: s32);
increment-statistic: func(category: statistic-category, stat-id: s32, amount: s32);
get-custom-statistic: func(stat: custom-statistic) -> s32;
set-custom-statistic: func(stat: custom-statistic, value: s32);
increment-custom-statistic: func(stat: custom-statistic, amount: s32);
send-stats: func();
get-team: func() -> option<string>;
start-cooldown: func(group: string, duration-ticks: s32);
get-cooldown: func(group: string) -> f32;
is-on-cooldown: func(group: string) -> bool;
set-allow-flight: func(allowed: bool);
set-fly-speed: func(speed: f32);
set-walk-speed: func(speed: f32);
set-invulnerable: func(invulnerable: bool);
get-inventory: func () -> player-inventory;
get-ender-chest: func () -> inventory;
get-selected-slot: func () -> u8;
get-item-in-hand: func (hand: hand) -> option<item-stack>;
get-inventory-item: func (slot: u8) -> option<item-stack>;
set-item-in-hand: func (hand: hand, stack: option<item-stack>);
set-inventory-item: func (slot: u8, stack: option<item-stack>);
get-ender-chest-item: func (slot: u8) -> option<item-stack>;
set-ender-chest-item: func (slot: u8, stack: option<item-stack>);
clear-ender-chest: func ();
open-ender-chest: func ();
get-health: func () -> f32;
set-health: func (health: f32);
get-max-health: func () -> f32;
set-max-health: func (max-health: f32);
get-food-level: func () -> u8;
set-food-level: func (food-level: u8);
get-saturation: func () -> f32;
set-saturation: func (saturation: f32);
get-exhaustion: func () -> f32;
set-exhaustion: func (exhaustion: f32);
get-absorption: func () -> f32;
set-absorption: func (absorption: f32);
get-experience-level: func() -> s32;
get-experience-progress: func() -> f32;
get-experience-points: func() -> s32;
set-experience-level: func(level: s32);
set-experience-progress: func(progress: f32);
set-experience-points: func(points: s32);
add-experience-levels: func(levels: s32);
add-experience-points: func(points: s32);
is-flying: func() -> bool;
set-flying: func(flying: bool);
in-combat: func() -> bool;
set-pose: func(pose: entity-pose, fixed: bool) -> result<_, string>;
has-fixed-pose: func() -> bool;
get-abilities: func() -> player-abilities;
set-abilities: func(abilities: player-abilities);
get-ip: func() -> string;
address-key: func() -> string;
get-skin: func() -> option<player-skin>;
set-skin: func(skin: player-skin);
get-skin-parts: func() -> skin-parts;
set-skin-parts: func(parts: skin-parts);
set-player-time: func(time: u64, relative: bool);
reset-player-time: func();
get-player-time: func() -> option<u64>;
is-player-time-relative: func() -> bool;
set-player-weather: func(weather: player-weather);
reset-player-weather: func();
get-player-weather: func() -> option<player-weather>;
set-compass-target: func(pos: position);
get-compass-target: func() -> position;
set-respawn-location: func(pos: position);
get-respawn-location: func() -> option<position>;
can-see: func(other: player) -> bool;
can-see-player: func(other: player) -> bool;
set-sleeping-ignored: func(ignored: bool);
is-sleeping-ignored: func() -> bool;
set-client-rules: func(forbidden: u64);
get-client-rules: func() -> u64;
set-tab-list-ping: func(latency-ms: s32);
set-item-cooldown: func(item-id: string, ticks: s32);
get-item-cooldown: func(item-id: string) -> option<s32>;
has-item-cooldown: func(item-id: string) -> bool;
ray-trace-block: func(max-distance: f64, include-fluids: bool) -> option<ray-trace-block-result>;
ray-trace-entity: func(max-distance: f64) -> option<ray-trace-entity-result>;
get-target-entity: func(max-distance: f64) -> option<entity>;
get-target-block: func(max-distance: u32) -> option<position>;
get-target-block-exact: func(max-distance: f64, include-fluids: bool) -> option<ray-trace-block-result>;
launch-projectile: func(%type: projectile-type) -> option<entity>;
get-advancement-progress: func(advancement-id: string) -> option<advancement-progress>;
award-advancement-criterion: func(advancement-id: string, criterion: string) -> bool;
revoke-advancement-criterion: func(advancement-id: string, criterion: string) -> bool;
award-advancement: func(advancement-id: string) -> bool;
revoke-advancement: func(advancement-id: string) -> bool;
has-advancement: func(advancement-id: string) -> bool;
get-completed-advancements: func() -> list<string>;
get-selected-advancement-tab: func() -> option<string>;
set-selected-advancement-tab: func(tab-id: option<string>);
show-dialog: func(dialog: dialog);
show-dialog-with: func(dialog: dialog, extras: dialog-extras) -> result<_, string>;
clear-dialog: func();
as-java: func() -> option<java-player>;
as-bedrock: func() -> option<bedrock-player>;
can-build: func(world-ref: borrow<%world>, pos: block-pos, action: build-action) -> result<_, build-refusal>;
}
record java-resource-pack {
id: uuid,
url: string,
hash: string,
forced: bool,
prompt-message: option<text-component>,
}
record bedrock-resource-pack-entry {
id: uuid,
version: string,
size: u64,
download-url: string,
content-key: option<string>,
sub-pack-name: option<string>,
content-id: option<string>,
has-scripts: bool,
addon-pack: bool,
rtx-enabled: bool,
}
record bedrock-resource-packs-info {
required: bool,
has-addon-packs: bool,
has-scripts: bool,
is-vibrant-visuals-force-disabled: bool,
world-template-id: option<uuid>,
world-template-version: option<string>,
packs: list<bedrock-resource-pack-entry>,
}resource java-player {
get-version: func() -> java-minecraft-version;
get-brand: func() -> string;
get-server-address: func() -> string;
get-settings: func() -> java-player-settings;
send-packet: func(packet: java-packet);
send-custom-payload: func(channel: string, data: list<u8>);
show-dialog: func(dialog: dialog);
clear-dialog: func();
get-scoreboard: func() -> scoreboard;
reset-scoreboard: func();
send-resource-pack: func(pack: java-resource-pack);
remove-resource-pack: func(id: uuid);
clear-resource-packs: func();
kick: func(options: java-kick-options);
send-game-event: func(event: client-game-event, value: f32);
send-entity-status: func(entity-id: s32, status: entity-status);
}
resource bedrock-player {
get-version: func() -> bedrock-minecraft-version;
get-settings: func() -> bedrock-player-settings;
get-ability: func(ability: bedrock-ability) -> bool;
set-ability: func(ability: bedrock-ability, value: bool);
get-status-flag: func(flag: bedrock-status-flag) -> bool;
set-status-flag: func(flag: bedrock-status-flag, value: bool);
send-packet: func(packet: bedrock-packet);
send-java-packet: func(packet: java-packet) -> result<_, string>;
open-form: func(form: form) -> u32;
get-scoreboard: func() -> bedrock-scoreboard;
reset-scoreboard: func();
send-resource-packs-info: func(info: bedrock-resource-packs-info);
kick: func(options: bedrock-kick-options);
}
get-world-players: func(world-ref: %world) -> list<player>;