mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-05 16:49:04 +00:00
Housekeeping
This commit is contained in:
@@ -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
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0"?>
|
||||
<plugin>
|
||||
<id>message</id>
|
||||
<version>1</version>
|
||||
<name>Messaging commands</name>
|
||||
<description>Adds various message-related commands, such as enabling the server-side chat filter or broadcasting a message.</description>
|
||||
<authors>
|
||||
<author>Major</author>
|
||||
<author>xEliqa</author>
|
||||
</authors>
|
||||
<scripts>
|
||||
<script>broadcast.rb</script>
|
||||
</scripts>
|
||||
<dependencies />
|
||||
</plugin>
|
||||
Reference in New Issue
Block a user