SIGNALS

Signals allow you to transfer information across servers.
Signals are better known as Plugin Messages.

Create a signal

A signal is formatted as key : values, which allows you to transfer any data that can be serialized.

signal [(with key|keyed)|(with name|named)] %string% (and|with) [data] %objects%
set {_signal} to signal named "broadcast" with data "Hello world!","Second data value!" and "Hey, look at me! I'm the third value!"

Get a signal’s key.

(key|signal name) of %signal%
%signal%'s (signal name|key)

Get a signal’s data

Returns a list of objects

data of %signal%
%signal%'s data

Send a signal

Allows you to send a signal to any connected server

Note: Only servers that are online will be able to receive the signal.

send signal %signals% to %servers%
set {_signal} to signal named "broadcast" with data "Hello world!","Ooo, spooky!", "Dark magic!"
send signal {_signal} to all servers

Listen for a signal event

It also allows you to track signals by key.

signal [(with key|keyed) %string%]

The event has built-in data, using the event-signal you can receive the incoming signal.

on join:
  set {_signal} to signal named "broadcast" with data "Welcome back %player%"
  send signal {_signal} to all servers

on signal with key "broadcast":
  broadcast (data of event-signal)