mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-04 00:38:11 +00:00
Update all plugins to conform to Rubocop.
This commit is contained in:
@@ -5,7 +5,8 @@ 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(" ")
|
||||
message = command.arguments.to_a.join(' ')
|
||||
broadcast = "[Broadcast] #{player.get_username.capitalize}: #{message}"
|
||||
$world.player_repository.each { |player| player.send_message(broadcast) }
|
||||
end
|
||||
|
||||
$world.player_repository.each { |other| other.send_message(broadcast) }
|
||||
end
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
require 'java'
|
||||
|
||||
on :command, :filter do |player, command|
|
||||
player.send_message('Your message filter is now ' + (player.toggle_message_filter ? 'enabled.' : 'disabled.'))
|
||||
end
|
||||
status = player.toggle_message_filter ? 'enabled' : 'disabled'
|
||||
player.send_message('Your message filter is now ' + status + '.')
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user