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
@@ -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>