players

abstract fun players(action: PlayerEditor.() -> Unit)

Applies an action to all players in the world.

Example:

world.edit {
players {
health = 20.0
foodLevel = 20
}
}

Parameters

action

The action to apply to each player

See also


abstract fun players(filter: (Player) -> Boolean, action: PlayerEditor.() -> Unit)

Applies an action to filtered players in the world.

Example:

world.edit {
players({ it.isOp }) {
gameMode = GameMode.CREATIVE
}
}

Parameters

filter

A predicate to filter players

action

The action to apply to each filtered player

See also