Player API
This page is generated from a recorded Java binding inventory. Supported means an official script uses the member; it does not mean the member has passed focused and live acceptance testing.
| Member | Stability | Verification | AI-runnable | Official use | Purpose |
|---|---|---|---|---|---|
attack | Experimental | bound | No | No | Attack |
can_reach_block | Experimental | bound | No | No | Check if block is within mining range Returns true if block is within 4.5 blocks and has line of sight |
distance_to | Supported | bound | No | Yes | Get 3D distance to position |
drop_item | Experimental | bound | No | No | drop current held item |
equip | Supported | bound | No | Yes | Equip |
find_hotbar_slot | Experimental | bound | No | No | find slot with item matching pattern (-1 if not found) |
get_air_control_factor | Experimental | bound | No | No | Get air control effectiveness (0.0-1.0). Returns multiplier for strafe effectiveness when airborne With high Jump Boost, this can be as low as 0.05 (5%) |
get_effect | Supported | bound | No | Yes | Get info about an active potion effect Returns table {active, level, amplifier, duration, ambient} or nil if not active |
get_hotbar_items | Experimental | bound | No | No | get table of all hotbar item names |
get_jump_boost_level | Experimental | bound | No | No | Get jump boost level (0 = none, 1-5 = Jump Boost I-V) |
get_max_jump_height | Experimental | bound | No | No | Get max jump height in blocks Takes into account Jump Boost effect |
get_nearest | Supported | bound | No | Yes | returns name of nearest player |
health | Experimental | bound | No | No | Health |
health_percent | Supported | bound | No | Yes | Health Percent |
held_item | Experimental | bound | No | No | Held Item |
held_slot | Experimental | bound | No | No | Held Slot |
horizontal_distance | Supported | bound | No | Yes | returns horizontal distance to location |
hotbar_contains | Experimental | bound | No | No | check if item matching pattern is in hotbar |
hunger | Experimental | bound | No | No | Hunger |
interact_block | Supported | bound | No | Yes | right-click a specific block Looks at block center first, then sends use-item-on interaction |
interact_entity | Experimental | bound | No | No | Interact Entity |
is_flying | Experimental | bound | No | No | Is Flying |
is_on_ground | Experimental | bound | No | No | Is On Ground |
is_rotation_locked | Experimental | bound | No | No | Is Rotation Locked |
is_sneaking | Experimental | bound | No | No | Is Sneaking |
is_sprinting | Experimental | bound | No | No | Is Sprinting |
jump | Supported | bound | No | Yes | Jump |
look_at | Supported | bound | No | Yes | Look At |
max_health | Experimental | bound | No | No | Max Health |
name | Supported | bound | No | Yes | Name |
pitch | Supported | bound | No | Yes | Pitch |
position | Supported | bound | No | Yes | Position |
raycast | Experimental | bound | No | No | Raycast |
sneak | Supported | bound | No | Yes | Sneak |
sprint | Experimental | bound | No | No | Sprint |
swing_hand | Experimental | bound | No | No | Swing Hand |
use_item | Supported | bound | No | Yes | Use Item |
x | Supported | bound | No | Yes | X |
y | Supported | bound | No | Yes | Y |
yaw | Supported | bound | No | Yes | Yaw |
z | Supported | bound | No | Yes | Z |