37 Commands and Permissions
ME1312 edited this page 2022-03-19 15:51:05 -04:00

This page defines all the commands provided by SubServers apps across your network and their permissions where they apply.

Topics on This Page:
BungeeCord Commands
SubServers Commands
Selecting Multiple Servers
Using Server Signs

BungeeCord Commands

SubServers provides for some of the more well-known BungeeCord commands alongside its own for a more seamless experience. For more information about these commands and their permissions, please visit the BungeeCord Wiki.

SubServers Commands

Permission: subservers.command

This is the main group of commands provided by SubServers that are intended for use by server admins.

For in-game users, these commands are all handled by SubServers.Client. So when applying these permissions, apply them on the servers, not the proxies. The above permission is required to access any commands in this section as a whole.

Command Descriptions:
/sub
/sub help
/sub version
/sub reload
/sub list
/sub info
/sub start
/sub restart
/sub stop
/sub terminate
/sub command
/sub sudo
/sub teleport
/sub create
/sub update
/sub delete

/sub

Aliases: sub, subserver, subservers
Permission: subservers.interface

When entered with no additional arguments, this command will attempt to open a visuals-based way of interacting with the server manager. If you don't have permission to do so, or if a GUI is not available, it will instead send you the same thing /sub help does.

/sub help


Sends you a concise, helpful list of many of the commands you see here.

/sub version

Aliases: ver, version

Sends you versioning info about a SubServers App and the platforms it runs on. Useful for troubleshooting your SubServers network.

This info will differ depending on where you send the command. Sending the command in-game and entering it in BungeeCord's console, for example, will produce different results.

/sub reload

Exclusive To: SubServers.Bungee
Usage: /sub reload [hard|bungee|servers|templates]
Examples:
    /sub reload
    /sub reload templates

Reloads the specified portion of SubServers.Bungee and its connected apps. Use this command to avoid restarting all the time.

Although it may accept many values, this command only has 4 reload modes:
-> templates: Reloads/Resends template data only
-> servers: Reloads SubServers' configs and searches for new servers
-> bungee: Reloads BungeeCord, SubServers, and your plugins (/greload uses this mode)
-> hard: Reloads BungeeCord, SubServers, and your plugins, discarding existing data from memory

/sub list


Sends you information about all known objects within SubServers in a detailed, yet concise, list format. This includes objects like: Proxies, Hosts, Groups, Servers and Subservers; the relationships between them; and their statuses.

/sub info

Aliases: info, status
Usage: /sub info [proxy|host|group|server|player] <Name>
Examples:
    /sub info Server1
    /sub info server Server1

Sends you all relevant information about a specific object within SubServers. This command can be really useful in troubleshooting. If you need a more in-depth look at an object than /sub list can give you, this is how you get it.

If, for whatever reason, you have objects that share the same name, you can specify the type of object you are looking for as well. Specifying a type also makes the command faster since it doesn't have to search all object types.

/sub start

Permission: subservers.subserver.<SubServers>.start
Usage: /sub start <Subservers>
Examples:
    /sub start Server1

Starts one or more subservers on the network.

/sub restart

Permission: subservers.subserver.<SubServers>.stop and subservers.subserver.<SubServers>.start
Usage: /sub restart <Subservers>
Examples:
    /sub restart Server1

Starts or restarts one or more subservers on the network.

/sub stop

Permission: subservers.subserver.<SubServers>.stop
Usage: /sub stop <Subservers>
Examples:
    /sub stop Server1

Stops one or more subservers on the network.

/sub terminate

Aliases: kill, terminate
Permission: subservers.subserver.<SubServers>.terminate
Usage: /sub terminate <Subservers>
Examples:
    /sub terminate Server1

Forcefully stops one or more subservers on the network.

Stopping subservers in this way can make you lose unsaved data though, so it is generally not recommended to use this command unless a server stops responding.

/sub command

Aliases: cmd, command
Permission: subservers.subserver.<Servers>.command
Usage: /sub command <Servers> <Command> [Args...]
Examples:
    /sub command Server1 version
    /sub command Server1 op Notch
    /sub command Server1 say Hello World!

Sends a command to the console of one or more servers on the network.

/sub sudo

Aliases: sudo, screen
Exclusive To: SubServers.Bungee
Usage: /sub sudo <Subserver>
Examples:
    /sub sudo Server1

Takes control over a subserver on the network in a more direct fashion. All commands sent after this one will be forwarded to the console of the subserver as-is, allowing you to send multiple commands more easily. Additionally, any further log messages from other subservers will be muted while in sudo.

To return to the BungeeCord console from sudo, type exit.

/sub teleport

Aliases: tp, teleport
Exclusive To: SubServers.Client
Permission: subservers.teleport, subservers.teleport-others
Usage: /sub teleport [Player] <Server>
Examples:
    /sub teleport Server1
    /sub teleport Notch Server1
    /sub teleport @p Server1

Server-side teleportation command; teleports a player on this server to another server on the network.

This is different from proxy-side teleportation commands, like /server and /send, because the execution is handled on the side of the server. Additionally, the command is limited to only selecting players that are on same the server it is being ran on. Because of these limitations, it is hidden from the help menu.

Unlike the other commands in this group, granting subservers.command is not required. This is because, despite not being used directly by players, you may find a situation where they'd need to be able to pass the permission check for this command.

Usage in Command Blocks

Aside from usage in other server-side plugins, Command Blocks are pretty much the de facto reason for this command's existence. Among other creative uses, you could do things like creating portals by using this command.

Spigot servers do not handle command block selectors correctly at this time. To use this command effectively in a command block, you should install CommandHook on your servers.

/sub create

Permission: subservers.host.<Hosts>.create
Usage: /sub create <Name> <Host> <Template> [Version] [Port]
Examples:
    /sub create Server2 Host1 MyTemplate
    /sub create Server2 Host1 Vanilla 1.12.2
    /sub create Server2 Host1 Vanilla 1.12.2 25567

Creates a subserver using the specified template on the specified host. For more information about this process, see the SubCreator page.

The version argument is template-dependent in this command, meaning that it is only required if your template requires it. Similarly, it will only be used if your template uses it.

/sub update

Aliases: update, upgrade
Permission: subservers.subserver.<SubServers>.update
Usage: /sub update <SubServers> [[Template] <Version>]
Examples:
    /sub update Server2
    /sub update Server2 1.14.4
    /sub update Server2 Paper 1.14.4

Updates one or more subservers on the network. For more information about this process, see the SubCreator page.

Like in /sub create, the version argument is template-dependent in this command, meaning that it is only required if your template requires it. Similarly, it will only be used if your template uses it. Additionally, your template might not support updating at all. If this is the case, the command will fail.

When selecting multiple servers, keep in mind that some templates use this command to rebuild their cache, like the default templates Spigot and Vanilla. In such cases, you would want to update a single server first to rebuild the cache and then update the rest in bulk.

Lastly, this command can also be used to change the template of a subserver. Changing a template in this way will overwrite settings in servers.yml as if the template had the Update-Settings build option enabled because, most of the time, it wouldn't work otherwise.

/sub delete

Aliases: del, delete, remove
Permission: subservers.subserver.<SubServers>.delete
Usage: /sub delete <Subservers>
Examples:
    /sub delete Server2

Removes one or more subservers from the network and moves its files to the Recently Deleted folder.

It should be noted that this is functionally the same internally as the API methods starting with .recycle, which are different from the API methods starting with .delete that actually permanently delete a server's files on disk.

Even so, due to the destructive nature of this command, it is not available for in-game users by default. Should you choose to enable this, it will require you to have its permission assigned to you directly as it is not included in the wildcard permission.

Selecting Multiple Servers

Some commands on this page allow you to perform the same action on multiple servers without having to retype the command every time. In a similar fashion, some permissions can use these same methods to grant a permission on multiple servers.

Selecting a Server:
This is as easy as it gets. We will be using this example throughout this section.

/sub cmd Server1 say Hello World!

Selecting multiple Servers:
If you just want to select multiple servers, this will do the job. It's essentially just a comma separated list. Although, if you have to select these same servers frequently, you may want to check out the methods after this one. Also, this method cannot be used in permissions.

/sub cmd Server1, Server2, Server3 say Hello World!

Selecting all Servers:
If you felt like broadcasting that command to all servers, you can select all of them with this wildcard symbol.

/sub cmd * say Hello World!

Selecting the Server you are currently on:
Speaking of wildcard symbols, this one is used to select the server you are currently on. However, this is only available when you are in-game, and it can't be used in permissions.

/sub cmd . say Hello World!

Selecting Multiple Servers using Groups

You can also use groups to select servers. To begin selecting using groups, type a : before whatever you are trying to select. Many of the methods and limitations beyond that point are the same as they were in the last section.

Selecting all Servers that belong to a specific Group:

/sub cmd :Group1 say Hello World!

Selecting all Servers that belong to at least one of multiple Groups:

/sub cmd :Group1, :Group2, :Group3 say Hello World!

Selecting all Servers that belong to at least one Group:

/sub cmd :* say Hello World!

Selecting all Servers that the server you are currently on shares a Group with:

/sub cmd :. say Hello World!

Selecting Multiple Subservers using Hosts

Lastly, you can select subservers using their hosts. To begin selecting using hosts, type :: before whatever you are trying to select. Many of the methods and limitations beyond that point are the same as they were in the last two sections.

Selecting all Subservers that belong to a specific Host:

/sub cmd ::Host1 say Hello World!

Selecting all Subservers that belong to one of multiple Hosts:

/sub cmd ::Host1, ::Host2, ::Host3 say Hello World!

Selecting all Subservers: (Subservers must belong to a Host)

/sub cmd ::* say Hello World!

Selecting all Subservers that the Host you are currently on provides for:

/sub cmd ::. say Hello World!

Using Server Signs

Exclusive To: SubServers.Client.Bukkit
Permission: subservers.teleport

Server signs are magic blocks that allow players to start and/or join servers of your choosing with a simple click. Even so, only the teleport permission is required for players to interact with the signs.

Managing Server Signs

Permission: subservers.signs

An admin with the above permission can turn a regular old sign into a server sign by writing [SubServers] on the first line, and the name of a server on the second. In an instant, all four lines will be replaced by that which was globally configured in lang.yml. You can also do this for server groupings by prefixing the name with : or :: as described in the last section.

At this point, you should think about securing the area if you haven't already. Signs are fragile things, so you should protect them using plugins that have been painstakingly built to serve that purpose. In other words, SubServers intentionally provides only the bare minimum in terms of block protection. Please do not file a bug report because someone broke your sign.