World

object World

Types

Link copied to clipboard
object border

World border object to get border parameters

Link copied to clipboard
object particle
Link copied to clipboard
object spawn

World spawn object for getting spawn location.

Functions

Link copied to clipboard
fun getAllEntities(): List<Entity>
Link copied to clipboard
fun getAllEntitiesOfType(clazz: Class<*>): List<Entity>

Gets every entity loaded in the world of a certain class

Link copied to clipboard
fun getAllPlayers(): List<PlayerMP>

Gets all of the players in the world, and returns their wrapped versions.

Link copied to clipboard
fun getAllTileEntities(): List<TileEntity>
Link copied to clipboard
fun getAllTileEntitiesOfType(clazz: Class<*>): List<TileEntity>
Link copied to clipboard
fun getBlockAt(pos: BlockPos): Block
fun getBlockAt(x: Number, y: Number, z: Number): Block

Gets the Block at a location in the world.

Link copied to clipboard
fun getBlockStateAt(pos: BlockPos): IBlockState

Gets the IBlockState at a location in the world.

Link copied to clipboard
fun getChunk(x: Int, y: Int, z: Int): Chunk
Link copied to clipboard
fun getDifficulty(): String
Link copied to clipboard
fun getMoonPhase(): Int
Link copied to clipboard
fun getPlayerByName(name: String): PlayerMP?

Gets a player by their username, must be in the currently loaded chunks!

Link copied to clipboard
fun getRainingStrength(): Float
Link copied to clipboard
fun getSeed(): Long
Link copied to clipboard
fun getTime(): Long
Link copied to clipboard
fun getType(): String
Link copied to clipboard
fun getWorld(): WorldClient?

Gets Minecraft's WorldClient object

Link copied to clipboard
fun hasPlayer(name: String): Boolean
Link copied to clipboard
fun isLoaded(): Boolean
Link copied to clipboard
fun isRaining(): Boolean
Link copied to clipboard
fun playRecord(name: String?, x: Double, y: Double, z: Double)

Play a record at location x, y, and z. Use null as name in the same location to stop record.

Link copied to clipboard
fun playSound(name: String, volume: Float, pitch: Float)

Play a sound at the player location.

Link copied to clipboard
fun stopAllSounds()

Sources

Link copied to clipboard