players
Applies an action to all players in the world.
Example:
world.edit {
players {
health = 20.0
foodLevel = 20
}
}Content copied to clipboard
Parameters
action
The action to apply to each player
See also
Applies an action to filtered players in the world.
Example:
world.edit {
players({ it.isOp }) {
gameMode = GameMode.CREATIVE
}
}Content copied to clipboard
Parameters
filter
A predicate to filter players
action
The action to apply to each filtered player