world

World and entity related functions

world.timer

world.timer(): number

Returns the multiplier of speed the game is running at.

world.set_timer

world.set_timer(timer_speed)

Sets the multiplier to make the speed faster or slower, 0.5 makes the game run at half-speed

world.refresh_chunks

world.refresh_chunks()

Refreshes the loaded chunks, just like F3+A does

world.entities

world.entities(): table

Returns a table with all the loaded entities IDs

world.block

world.block(x, y, z): string

Returns the name of the block in the specified cords

world.name

world.name(entity_id): string

Returns the name of the specified entity

world.display_name

world.display_name(entity_id): string

Returns the display name of the specified entity, example: [MVP++] Player

world.held_item

world.held_item(entity_id): string

Returns the name of the item the player is holding

world.hurt_time

world.hurt_time(entity_id): number

Returns how much ticks of hurt time the player has left

world.health

world.health(entity_id): number

Returns the player health, divide by two for getting heart amount

world.max_health

world.max_health(entity_id): number

Returns the player max health, divide by two for getting heart amount

world.sprinting

world.sprinting(entity_id): boolean

Returns if the player is sprinting

world.facing

world.facing(entity_id): number

This function will return a direction on a number

1: Down 2: Up 3: North 4: South 5: West 6: East

world.angles

world.angles(entity_id): number, number

Returns the player's yaw and pitch

world.bounding_box

world.bounding_box(entity_id): number, number, number, number, number, number

Returns minX, minY, minZ, maxX, maxY, maxZ of the players BBOX

world.ticks_existed

world.ticks_existed(entity_id): number

Returns the ticks the player has existed in the world

world.is_player

world.is_player(entity_id): boolean

Returns if the entity is a player

world.width_height

world.width_height(entity_id): number, number

Returns the entity width and height

world.is_sneaking

world.is_sneaking(entity_id): boolean

Returns if the entity is sneaking

world.is_invisible

world.is_invisible(entity_id): boolean

Returns if the entity is invisible

world.burning

world.burning(entity_id): boolean

Returns if the entity is burning

world.is_bot

world.is_bot(entity_id): boolean

Returns if the entity is detected as a bot by the client

world.is_friend

world.is_friend(entity_id): boolean

Returns if the entity is a friend in the client

world.is_enemy

world.is_enemy(entity_id): boolean

Returns if the entity is an enemy in the client

world.riding

world.riding(entity_id): boolean

Returns if the entity is riding anything

world.position

world.position(entity_id): number, number, number

Returns the player's x, y and z positions

world.prev_position

world.prev_position(entity_id): number, number, number

Returns the previous player's x, y and z positions

world.is_potion_active

world.is_potion_active(entity_id, potion_id): boolean

Returns if the player has the specified potion id active

world.remove

world.remove(entity_id): boolean

Removes the entity from the world, will return true if successfully removed

world.biome

world.biome(): string

Returns the current biome name

world.inventory

world.inventory(): table

Returns the player's inventory in a table, table.helmet, table.chestplate, table.leggings, table.boots, table.hand

Last updated