Housekeeping

This commit is contained in:
KeepBotting
2019-03-26 14:05:40 -04:00
parent a0c78ced90
commit 739c331860
135 changed files with 4 additions and 4 deletions
@@ -0,0 +1,12 @@
require 'java'
java_import 'org.apollo.game.model.World'
java_import 'org.apollo.game.model.entity.Player'
# Adds a command to broadcast a message to every player on the server.
on :command, :broadcast, RIGHTS_ADMIN do |player, command|
message = command.arguments.to_a.join(' ')
broadcast = "[Broadcast] #{player.get_username.capitalize}: #{message}"
$world.player_repository.each { |other| other.send_message(broadcast) }
end