mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-03 00:38:21 +00:00
Rename filter plugin to messaging, add broadcast command.
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<plugin>
|
||||
<id>cmd-filter</id>
|
||||
<version>1</version>
|
||||
<name>Filter commandr</name>
|
||||
<description>Adds a command to toggle a server-side message filter, for clients that have not been edited.</description>
|
||||
<authors>
|
||||
<author>Major</author>
|
||||
</authors>
|
||||
<scripts>
|
||||
<script>filter.rb</script>
|
||||
</scripts>
|
||||
<dependencies />
|
||||
</plugin>
|
||||
@@ -0,0 +1,11 @@
|
||||
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.world.player_repository.each { |player| player.send_message(broadcast) }
|
||||
end
|
||||
@@ -0,0 +1,16 @@
|
||||
<?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>filter.rb</script>
|
||||
<script>broadcast.rb</script>
|
||||
</scripts>
|
||||
<dependencies />
|
||||
</plugin>
|
||||
Reference in New Issue
Block a user