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 clientswill connect to a singleSyncket serverto transfer data - You can host many
Syncket serverstoo, but onlySyncket clientswhich connect to that will be able to communicate
/syncket/syncket reloadReload config file and restart Syncket/syncket startStart Syncket if it's stopped/syncket stopStop Syncket if it's started
sync <mode> <action> [target] <data>modeset the destination of dataSERVERsends to Syncket server onlyCLIENTSsends to all Syncket clientsGROUPsends to all Syncket server or clients in a defined groupSPECIFICsends to a single Syncket server or clientALLsends to all Syncket server and clients including thisOTHERSsends to all Syncket server and clients but not this
actionset the action of dataCOMMANDexecutes a command from the consoleBROADCASTbroadcasts a message to all online playersEVENTfires a CustomSyncketEvent
targetonly needed ifmodeisGROUPorSPECIFICdatathe command, message or CustomSyncketEvent data (will be converted to a JsonElement)
syncket.useUse sync commandsyncket.adminUse syncket command
debugset to true for more spam in consoletypeset this Syncket instance to CLIENT or SERVERip,portSERVERbinds the socket to ip and portCLIENTip and port of server to connect
groupdefines a groupidentifierpasswordpassword 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();
}