-
Notifications
You must be signed in to change notification settings - Fork 65
Bans
Negativity has its own ban subsystem, it is flexible and can be used in two ways:
- manually, with commands
- automatically, by banning a player when they have too many warns
This subsystem is only used by Spigot and Sponge plugins, the proxy plugins do not use it.
The ban subsystem configuration is located in the main config file (config.yml
or config.conf
) or in bans.yml
for v2, and is quite simple:
-
active
: the main 'switch' of the subsystem, iftrue
ban-related commands of the plugins can be used and players may be banned automatically for cheating (if they fulfill configurable conditions). Defaults tofalse
-
processor
: the ID of the processor to use. Processors are used to execute and fetch bans. Defaults tofile
-
time.calculator
: a JavaScript code snippet to compute the duration of a ban. It supports the following placeholders:-
%reliability%
: the reliability of the alert triggering the ban -
%alert%
: the number of alerts for the cheat of the alert -
%all_alert%
: all alerts for the detected cheat since you added Negativity on your server
-
-
reliability_need
: the minimum reliability of the alert needed to ban a player. Defaults to95
-
alert_need
: the number of alerts for the same cheat required before trying banning the player. Defaults to10
-
def.time
: the number of bans for a player before banning him definitely. Defaults to2
If a player have been banned, you can prevent alt/multiples accounts.
To add an action, you have to create new section on alt
part of ban config.
The key have to be the number of account needed to show. For example, if you set 3, the third account to log in will run the action.
You don't have to set all account number. If you set only 2, and player have 3 accounts, it will run the action of 2 (near lower account).
If you set 1
, it will be showed for all account.
Available actions :
-
alert
: send message to alt account -
alert_mod
: send message to all mod (= ShowAlert permission) -
ban
: Automatically ban alt account -
ban_all
: Ban all alt (just logged and all other previous). Warn: this is not available with all bans processor.
You have to set the sent message by using message: "My message"
.
For message, it's used for direct send (not translated, just colored).
For ban, it's used as reason.
About ban, you can set if it's definitive with def: true
, or set the time thanks to time: 1000
(here, ban 1 second).
You also can set conditions to run the action. To do it, use :
condition:
warning: 1
Now, there is only a check of amount of warn.
Finally, this is an example :
4:
action: ban
message: "Alt unauthorized"
# the time of the ban in milliseconds.
# set '-1' or "def: true" for definitive ban
time: 360000
# condition to be banned
# Get Warn and Violation from ALL account
condition:
# Need at least 30 warn
warning: 30
Like each processor have own working system, some of them don't have some features.
The "BanAll" indicator, show you if the processor is compatible with alt ban system.
ID: file
Platform: All
BanAll: Not yet.
Stores bans on the local filesystem. Useful if you only have one server.
Its configuration is located in the main config file, under ban.file
:
-
log_bans
: whether old bans (expired or manually revoked) should be kept. Defaults totrue
.
ID: database
Platform: All
BanAll: Yes.
Stores bans in a database. Requires a valid database configuration.
Its configuration is located in the main config file, under ban.database
:
-
log_bans
: whether old bans (expired or manually revoked) should be kept. Defaults totrue
.
ID: command
Platform: All
BanAll: Unknow.
Executes bans via custom commands. Since this one only uses commands it does not support logged bans.
Its configuration is in the main config file, under ban.command
:
-
ban
is the list of command to execute when executing bans -
unban
is the same thanban
, but for revoking bans
Both lists must contain strings, the order of the commands is respected.
Each command can contain the following placeholders:
-
%uuid%
: the UUID of the player -
%name%
: the name of the player -
%ip%
: the IP address of the player -
%reason%
: the reason of the ban -
%alert%
: the number of alerts for the detected cheat that triggered the ban -
%all_alert%
: all alerts for the detected cheat since you added Negativity on your server -
%life%
: the health of the player at the moment the command is executed -
%level%
: the level of the player -
%gm%
: the gamemode of the player -
%walk_speed%
: the speed at which the player should walk
ID: bukkit
Platform: Spigot
BanAll: No.
Uses Bukkit's ban system (which by extension is vanilla's one).
ID: maxbans
Platform: Spigot
BanAll: Yes.
Uses MaxBans.
ID: advancedban
Platform: Spigot
BanAll: No.
Uses AdvancedBan.
ID: litebans
Platform: Spigot
BanAll: Yes.
Uses LiteBans.
ID: sponge
Platform: Sponge
BanAll: No.
Uses Sponge's BanService (which delegates to the vanilla system by default). Ban plugins usually provide their own service implementation.
However, it has the drawback of not supporting logged bans.
Welcome to Negativity's wiki !