Skip to content
Иван edited this page May 25, 2022 · 1 revision
  • Installation

1. Read this entire post before installing.
2. Download the jar file.
3. Stop your BungeeCord server, if it isn’t already.
4. Put the CommandSync.jar file in your BungeeCord’s plugin folder.
5. Start your BungeeCord server.
6. Stop your BungeeCord server.
7. Set the pass in the /plugins/CommandSync/config.txt.
8. Start your BungeeCord server.
9. Stop your Minecraft servers, if they aren’t already.
10. Put the CommandSync.jar file in your plugin/mods folder on your Minecraft servers. Magically, they don’t need to be under the same BungeeCord instance.
11. Start your Minecraft servers.
12. Stop your Minecraft servers.
13. In each /plugins/CommandSync/config.txt or /config/commandsync/config.txt put a UNIQUE name for identification. Example: survival, creative or whatever. Also put the pass that you set in CommandSyncServer’s config.txt.
14. Start your Minecraft servers.
15. Woo, you’re done!

  • Usage
    Here are some example uses.

/sync console all broadcast Hi there people! would make the console on all servers run the command broadcast Hi there people!
/sync console survival broadcast Hey there! would make the console on the server identified as survival run the command broadcast Hey there!
/sync console bungee alert Wassup! would make the console of the BungeeCord server run the command alert Wassup!
/sync player all me Hey would make every online player under the BungeeCord instance the CommandSyncServer is running off run the command /me Hey
/sync player md_5 give YoFuzzy3 cookie 1337 would make the player md_5 run the command /give YoFuzzy3 cookie 1337

(Of course when you make a player perform a command they must have the permission to use it)

  • Commands (Only Minecraft Servers)
  • /sync – view the help menu.
  • /sync console – Send a command to run on all Minecraft servers, a single Minecraft server, or the BungeeCord server.
  • /sync player – Send a command to run for all players, or a single player.
  • Permissions
  • sync.use – Access to the command /sync. Default: OP.
  • Configuration
  • CommandSyncServer
    • ip=localhost
    • port=9190
    • heartbeat=1000
    • pass=UNSET
    • debug=false

ip – The IP that the CommandSyncServer tries to bind to.
port – The port that the CommandSyncServer tries to bind to.
heartbeat – In milliseconds, how often should the CommandSyncServer process data.
pass – A password that all clients must authorize through. (UNSET means the plugin will not operate.)
debug – If true all debug will be saved to a log.txt file.

  • CommandSyncClient
    • ip=localhost
    • port=9190
    • heartbeat=1000
    • name=UNSET
    • pass=UNSET
    • debug=false
    • removedata=false

ip – The IP that the CommandSyncClient tries to connect to.
port – The port that the CommandSyncClient tries to connect to.
heartbeat – In milliseconds, how often should the CommandSyncClient process data.
name – A UNIQUE identifier for the CommandSyncClient, used for the /sync console single command. (UNSET means the plugin will not operate.)
pass – A password that the client uses to authorize with the server. (UNSET means the plugin will not operate.)
debug – If true all debug will be saved to a log.txt file.
removedata – If true, will delete the file data.txt.

  • Awesome Features

This plugin now uses Java networking, making it much more reliable than the Plugin Messaging System. This means that silly bugs no longer exist. It also means you can synchronize commands across Minecraft servers under different BungeeCord server instances!
If you try sync a command and the CommandSyncServer is down, it will be kept in a queue for when it comes back online!
If a Minecraft server is down the CommandSyncServer will wait until it comes back online before it tells it to run a command!
If you try sync a command for a player that is offline, the command will not be attempted to run until they come back online!
All command queues are saved to a file on shutdown, meaning you can have downtimes across many servers but every command will be stored and run as soon as possible!
Authorization for secure cross-network links!
Debug file logging!

  • Internals
    Here’s my very bad diagram of how it works made in Paint, you’re welcome to make me a better one. http://imgur.com/llIbkia

If that diagram made no sense to you here it is in most basic text form.

/sync console all /sync → Single CSCCSS → All CSCs → MC Console → Run
/sync console /sync → Single CSCCSS → Defined CSC → MC Console → Run
/sync console player /sync → Single CSCCSS → Defined CSC → MC Console → Run
/sync console bungee /sync → Single CSCCSS → Bungee Console → Run
/sync player all /sync → Single CSCCSS → All Players → Run
/sync player /sync → Single CSCCSC → Defined Player → Run

The `/proxysync` command with the same arguments is used for the proxy server.
To execute the command “/sync console player ” you need the player to be online and the server name in the plugin configuration coincided with the server name in the configuration of the proxy server.
Because of how it all works data has to be saved. So here’s that explained.

CommandSyncClient (CSC) saves:

All the string commands that have been sent. These are never cleared.
An int value representing where the CSC is up to in sending commands to the CSS. This is not cleared.
This allows the CSC to queue up commands if the CSS goes down.

CommandSyncServer (CSS) saves:

All the string commands that have been received. These are never cleared.
An int value for every CSC representing where it is up to in sending commands to that CSC. These are never cleared.
This allows the CSS to queue up commands so when a CSC goes down commands will be run when it comes back online, or when a new CSC is added to the setup the stored commands can be run for it.
All the commands that have been queued up for offline players. These are cleared after being run.
These are run when the player comes online.

Deleting any piece of data (excluding the queued commands for offline players) will cause the CSS and the CSCs to go out of sync (wow such pun) potentially causing commands to be run duplicate times.

If the CSS or a CSC crashes and prevents its data from saving then the same effect as described above may occur.

If you are confident that all commands have been processed successfully and would like to reset the saves then you must:

Shut down the Bungee server running CSS and all MC servers running CSC.
Delete all the data.txt files located at:
Bungee/plugins/CommandSync/data.txt
Bukkit Server/plugins/CommandSync/data.txt
Sponge Server/config/commandsync/data.txt
Start up all the servers.

Clone this wiki locally