world
World and entity related functions
world.timer
Returns the multiplier of speed the game is running at.
world.set_timer
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
Returns the name of the block in the specified cords
world.name
Returns the name of the specified entity
world.display_name
Returns the display name of the specified entity, example: [MVP++] Player
world.held_item
Returns the name of the item the player is holding
world.hurt_time
Returns how much ticks of hurt time the player has left
world.health
Returns the player health, divide by two for getting heart amount
world.max_health
Returns the player max health, divide by two for getting heart amount
world.sprinting
Returns if the player is sprinting
world.facing
This function will return a direction on a number
1: Down 2: Up 3: North 4: South 5: West 6: East
world.angles
Returns the player's yaw and pitch
world.bounding_box
Returns minX, minY, minZ, maxX, maxY, maxZ of the players BBOX
world.ticks_existed
Returns the ticks the player has existed in the world
world.is_player
Returns if the entity is a player
world.width_height
Returns the entity width and height
world.is_sneaking
Returns if the entity is sneaking
world.is_invisible
Returns if the entity is invisible
world.burning
Returns if the entity is burning
world.is_bot
Returns if the entity is detected as a bot by the client
world.is_friend
Returns if the entity is a friend in the client
world.is_enemy
Returns if the entity is an enemy in the client
world.riding
Returns if the entity is riding anything
world.position
Returns the player's x, y and z positions
world.prev_position
Returns the previous player's x, y and z positions
world.is_potion_active
Returns if the player has the specified potion id active
world.remove
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