What are server scopes?
Server scopes are a new feature introduced in LiteBans version 2.2.
You can create punishments which only affect one server, and if you want, you can do this by default per-server, so each server only has its own punishments for its own scope.
By default, punishments affect the global scope(
*), meaning that they affect all servers on all networks connected to the same database.
How do I use server scopes?
There are two options in config.yml:
server_name: 'litebans' default_server_scope: '*'
If the plugin is installed on Spigot: The server_name is used as the local server scope. This means that you can issue punishments targeting this server specifically, for example:
With this, you can execute
/ban Player server:Survival and Player will only be banned on Survival.
To remove this ban, you can execute:
/unban Player server:Survival
If your default server scope is not global, you can still create global punishments:
/ban Player server:global
If the plugin is installed on BungeeCord: The server_name is used as the local network scope. This means that if you have multiple BungeeCord instances, you can create punishments affecting this BungeeCord network specifically (not other networks).
Under BungeeCord, the servers you have configured in the proxy's
config.yml (sub-servers) can also be used as server scopes.
Default Server Scope:
The default_server_scope decides, per-instance, which server or network will be affected by default.
Since it is set to
* by default, all punishments are global and affect all servers and networks.
You can set default_server_scope to
local and it will only affect the server you're currently on.
Under Spigot, using
local as a server scope has the same effect as using the
Under BungeeCord, using
local will affect the sub-server it is executed from (not the network unless it is executed from console).
If the default_server_scope is not global,
litebans.server.<scope> permission is required to use non-default server scopes (e.g.
litebans.server.Survival for server:Survival).
Punishments can only override other punishments if they are placed on the same server scope.
If a player has a 1 day ban on Survival and receives a 30 day global ban, both bans will independently take effect, no merging or overriding will take place.
These scopes are all equivalent to each other:
All of these commands accept an optional "server:" argument.
- /ban, /mute, /warn, /ipban, /ipmute, /tempban, /tempmute, /unban, /unmute, ...
- /checkban, /checkmute
- /history, /staffhistory, /warnings
- /lockdown: always defaults to 'local' scope. Unsynchronized.
These commands do not currently accept a "server:" argument and will always affect all servers connected to the same database.
- /dupeip, /ipreport, /iphistory, /lastuuid, /geoip
Scopeless Unsynchronized Commands
These commands do not currently accept a "server:" argument and only affect the plugin instance they are executed on.
- /clearchat, /mutechat, /togglechat