Sync data between Spigot servers using socket!
You will need
- 1 Spigot server as
Syncket server
- 1 or more Spigot servers as
Syncket client
How it works
- Many
Syncket clients
will connect to a singleSyncket server
to transfer data - You can host many
Syncket servers
too, but onlySyncket clients
which connect to that will be able to communicate
/syncket
/syncket reload
Reload config file and restart Syncket/syncket start
Start Syncket if it's stopped/syncket stop
Stop Syncket if it's started
sync <mode> <action> [target] <data>
mode
set the destination of dataSERVER
sends to Syncket server onlyCLIENTS
sends to all Syncket clientsGROUP
sends to all Syncket server or clients in a defined groupSPECIFIC
sends to a single Syncket server or clientALL
sends to all Syncket server and clients including thisOTHERS
sends to all Syncket server and clients but not this
action
set the action of dataCOMMAND
executes a command from the consoleBROADCAST
broadcasts a message to all online playersEVENT
fires a CustomSyncketEvent
target
only needed ifmode
isGROUP
orSPECIFIC
data
the command, message or CustomSyncketEvent data (will be converted to a JsonElement)
syncket.use
Use sync commandsyncket.admin
Use syncket command
debug
set to true for more spam in consoletype
set this Syncket instance to CLIENT or SERVERip
,port
SERVER
binds the socket to ip and portCLIENT
ip and port of server to connect
group
defines a groupidentifier
password
password for clients to verify before sending data
Send data (like /sync command)
SyncketManager.send(SendMode mode, ActionType action, String target, JsonElement data)
Using CustomSyncketEvent
@EventHandler
public void onSyncket(CustomSyncketEvent event) {
// get which Syncket that sent this event
String source = event.getSource();
// get the data received
JsonElement data = event.getData();
}