mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-03 00:38:21 +00:00
Convert messaging commands to Kotlin
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import org.apollo.game.model.entity.setting.PrivilegeLevel
|
||||
|
||||
on_command("broadcast", PrivilegeLevel.ADMINISTRATOR)
|
||||
.then { player ->
|
||||
val message = arguments.joinToString(" ")
|
||||
val broadcast = "[Broadcast] ${player.username.capitalize()}: $message"
|
||||
|
||||
player.world.playerRepository.forEach { other ->
|
||||
other.sendMessage(broadcast)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user