Skip to content
/ Syncket Public

Sync data between Spigot servers using Socket!

Notifications You must be signed in to change notification settings

dhiepp/Syncket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Syncket

Sync data between Spigot servers using socket!

Installation

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 single Syncket server to transfer data
  • You can host many Syncket servers too, but only Syncket clients which connect to that will be able to communicate

Commands

  • /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 data
      • SERVER sends to Syncket server only
      • CLIENTS sends to all Syncket clients
      • GROUP sends to all Syncket server or clients in a defined group
      • SPECIFIC sends to a single Syncket server or client
      • ALL sends to all Syncket server and clients including this
      • OTHERS sends to all Syncket server and clients but not this
    • action set the action of data
      • COMMAND executes a command from the console
      • BROADCAST broadcasts a message to all online players
      • EVENT fires a CustomSyncketEvent
    • target only needed if mode is GROUP or SPECIFIC
    • data the command, message or CustomSyncketEvent data (will be converted to a JsonElement)

Permissions

  • syncket.use Use sync command
  • syncket.admin Use syncket command

Config file

  • debug set to true for more spam in console
  • type set this Syncket instance to CLIENT or SERVER
  • ip , port
    • SERVER binds the socket to ip and port
    • CLIENT ip and port of server to connect
  • group defines a group
  • identifier
  • password password for clients to verify before sending data

Using Syncket in other plugins

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();
}

About

Sync data between Spigot servers using Socket!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages