world
World and entity related functions
world.timer
Returns the multiplier of speed the game is running at.
world.set_timer
Argument
Type
Description
timer_speed
Number
Timer speed
Sets the multiplier to make the speed faster or slower, 0.5 makes the game run at half-speed
world.refresh_chunks
Refreshes the loaded chunks, just like F3+A does
world.entities
Returns a table with all the loaded entities IDs
world.block
Argument
Type
Description
x
Number
x position
y
Number
y position
z
Number
z position
Returns the name of the block in the specified cords
world.name
Argument
Type
Description
entity_id
Number
ID of the entity
Returns the name of the specified entity
world.display_name
Argument
Type
Description
entity_id
Number
ID of the entity
Returns the display name of the specified entity, example: [MVP++] Player
world.held_item
Argument
Type
Description
entity_id
Number
ID of the entity
Returns the name of the item the player is holding
world.hurt_time
Argument
Type
Description
entity_id
Number
ID of the entity
Returns how much ticks of hurt time the player has left
world.health
Argument
Type
Description
entity_id
Number
ID of the entity
Returns the player health, divide by two for getting heart amount
world.max_health
Argument
Type
Description
entity_id
Number
ID of the entity
Returns the player max health, divide by two for getting heart amount
world.sprinting
Argument
Type
Description
entity_id
Number
ID of the entity
Returns if the player is sprinting
world.facing
Argument
Type
Description
entity_id
Number
ID of the entity
This function will return a direction on a number
1: Down 2: Up 3: North 4: South 5: West 6: East
world.angles
Argument
Type
Description
entity_id
Number
ID of the entity
Returns the player's yaw and pitch
world.bounding_box
Argument
Type
Description
entity_id
Number
ID of the entity
Returns minX, minY, minZ, maxX, maxY, maxZ of the players BBOX
world.ticks_existed
Argument
Type
Description
entity_id
Number
ID of the entity
Returns the ticks the player has existed in the world
world.is_player
Argument
Type
Description
entity_id
Number
ID of the entity
Returns if the entity is a player
world.width_height
Argument
Type
Description
entity_id
Number
ID of the entity
Returns the entity width and height
world.is_sneaking
Argument
Type
Description
entity_id
Number
ID of the entity
Returns if the entity is sneaking
world.is_invisible
Argument
Type
Description
entity_id
Number
ID of the entity
Returns if the entity is invisible
world.burning
Argument
Type
Description
entity_id
Number
ID of the entity
Returns if the entity is burning
world.is_bot
Argument
Type
Description
entity_id
Number
ID of the entity
Returns if the entity is detected as a bot by the client
world.is_friend
Argument
Type
Description
entity_id
Number
ID of the entity
Returns if the entity is a friend in the client
world.is_enemy
Argument
Type
Description
entity_id
Number
ID of the entity
Returns if the entity is an enemy in the client
world.riding
Argument
Type
Description
entity_id
Number
ID of the entity
Returns if the entity is riding anything
world.position
Argument
Type
Description
entity_id
Number
ID of the entity
Returns the player's x, y and z positions
world.prev_position
Argument
Type
Description
entity_id
Number
ID of the entity
Returns the previous player's x, y and z positions
world.is_potion_active
Argument
Type
Description
entity_id
Number
ID of the entity
potion_id
Number
ID of the potion to check if active
Returns if the player has the specified potion id active
world.remove
Argument
Type
Description
entity_id
Number
ID of the entity
Removes the entity from the world, will return true if successfully removed
world.biome
Returns the current biome name
world.inventory
Returns the player's inventory in a table, table.helmet, table.chestplate, table.leggings, table.boots, table.hand
Last updated
Was this helpful?