Skip to content
This repository was archived by the owner on Aug 23, 2022. It is now read-only.

Configuration

MSWS edited this page Jun 5, 2020 · 3 revisions

NOPE's configuration is thorough, complex, and extremely configurable.

There is an in-depth tutorial on the config available here.

Key Description Values
ConfigVersion This is set per update so when updated the plugin can inform you if the config needs to be reset Do not change
Global If false NOPE will not flag any players Boolean
Scoreboard If false no scoreboards will be enabled Boolean
Log Sets how NOPE will log logs String (NONE/file/hastebin)
UpdateChecker.Enabled If enabled NOPE will print in console when an update is available Boolean
UpdateChecker.InGame If enabled players with the permission nope.message.update will be notified when an update is available Boolean
BungeeNameOverride If not empty NOPE will replace %server% with the specified value String
BanwaveRate The amount of ticks that should be between banwaves Integer (-1 to disable)
DevMode Whether or not NOPE is in developer mode Boolean
DebugMode Whether or not NOPE is in debug mode Boolean
Webhooks Please see the Webhooks section ConfigSection
Actions Please see the Actions section ConfigSection
Commands The list of custom commands ConfigSection
Checks Here you can specify which checks are(n't) enabled ConfigSection

The next sections all support the following placeholders (including PAPI).

Placeholder Description
%player% Player's name
%uuid% Player's UUID (with -'s)
%nuuid% Player's UUID (without -'s)
%check% The check category
%debug% The check debug id
%vl% The VL the player flagged at
%world% The world name the player is in
%token% The ban token (ban(wave) action only)
%server% The name of the server

Webhooks

Webhooks allow a server administrator to setup Discord (or potentially other websites/platforms) notifications based on in-game events. It is recommended you checkout this guide on GitHub and this guide on Discord if you are new to webhooks.

The keys under each webhook is interpreted as a separate formatting message. Each format message is then able to be specified under the LOG action. This means that you can specify a different format for say if a player flags KillAura compared to Flight.

The only required data is the URL for the webhook. All other fields are optional or will be auto-filled with defaults.

The default example of two webhooks is below.

Webhooks:
  banExample:
    URL: 'https://discordapp.com/api/webhooks/'
    username: 'NOPE'
    avatar_url: 'https://i.imgur.com/U33fgPg.png'
    embeds:
      author:
        name: "%player% Ban"
        avatar_url: 'https://i.imgur.com/U33fgPg.png'
      title: '%player% was banned for %check%'
      color: 14483456
      fields:
        check:
          name: "Check"
          value: "%debug%"
        world:
          name: "World"
          value: "%world%"
        vl:
          name: "VL"
          value: "%vl%"
          inline: false
  flagExample:
    URL: 'https://discordapp.com/api/webhooks/'
    username: 'NOPE'
    avatar_url: 'https://i.imgur.com/U33fgPg.png'
    embeds:
      author:
        name: "%player%"
        icon_url: 'https://crafatar.com/avatars/%uuid%'
      title: '%player% flagged %check%'
      color: 751818
      fields:
        1:
          name: "Player"
          value: "%player%"
        2:
          name: "World"
          value: "%world%"
        3:
          name: "Server"
          value: "%server%"
          inline: true
        4:
          name: "VL"
          value: "%vl%"
        5:
          name: "Check"
          value: "%debug%"
        6:
          name: "UUID"
          value: "%uuid%"
     #thumbnail:
     #  url: ''
     #image:
     #  url: ''
      footer:
        text: "MSWS.XYZ"
       #icon_url: ''

Actions

Actions dictate what happens when a player flags a certain hack. There are two major types of "actions", the type that executes an action and the type that checks if a condition is met. For all conditional actions except for delay, if the condition is not met then no remaining actions will be run/checked within the same action group.

An ActionGroup is defined as one of the lines specified under the check type. For example, a valid actiongroup would be basiclog|vl>500|ikick|vl>1000|cban. As a result of the config, multiple action groups can be defined for one category. Each actiongruop will be executed independently of each other linearly.

Actionary Actions

Action Description Values Example
animation Runs the specified animation and the actions specified after it ends TYPE, Action animation:NOPE:cban
kick Kicks the player for the specified reason String kick:Please stop hacking!
ban Bans the player for the specified reason and duration Long, String ban:-1:You are hacking!
banwave Queues the player on the banwave for the specified reason and duration Long, String banwave:-1:You were hacking!
cancel Teleports the player back to the ground
pmsg Sends a message to the player String pmsg:You seem to be hacking, please stop!
msg Sends a message to a specified permission group or to all players online String, String msg:all:%player% is hacking!
cmd Runs a specific command as the player String say I'm hacking!
ccmd Runs a specific command as the console String say %player% is hacking!
log Logs a specific message to the specific target String, String log:INGAME:%player% is suspected of using %check%
log Logs a specific message to the specified webhook String, String log:flagExample:
setvl Sets the player's VL for the category they flagged Integer setvl:10
addvl Adds the specified VL amount for the cateogyr they flagged Integer addvl:-100

Conditional Actions

Conditional Actions support basic comparison expressions. (<, <=, =, !=, >=, >) Conditional actions should use the key first, followed by a colon if specifying a value or a comparison expression if numerical, and then the value to compare.

Action Description Example
vl Compares the player's VL vl>100
tps Compares the server's TPS tps>15
ping Compares the player's ping (can be spoofed) ping<=150
delay Sets a cooldown for the next action, useful for preventing spam delay:4500
notdev Only triggers if NOPE is not in dev mode notdev
isdev Only triggers if NOPE is in dev mode isdev
rnd Only triggerse the specified % chance rnd:.40

Custom Commands

Custom commands are specified under the Commands section of the config. Custom commands are created and registered in order, you are able to use custom commands within custom commands, however keep in mind you cannot use a custom command that hasn't already been specified. A custom command is required for ban animations to work. Despite the name, custom commands specify an ActionGroup.

The default configuration regarding Actions/Commands can be found below.

#               -------------------------------
#                  Action Configuration
#
#    Please note that bans are not necesssarily instantaneous.
#           Please add a delay to prevent duplicate bans.
#
# animation:[TYPE]:Action - TYPEs are NOPE or GWEN, the Action should be a custom command
# kick:Reason         Kick the player for the specified reason
# ban:Time:Reason     Ban the player for the specified time/reason
# banwave:Time:Reason Add the player to the banwave
# cancel              Teleport the player back
# pmsg:[Message]      Send a message to the player
# msg:[all/Permission]:[Message] Can also specify all
# cmd:[Command]       Run a command as the player
# ccmd:[Command]      Run a command from console
# log:type:message    Logs the message either to FILE, INGAME, or CONSOLE (perm: nope.message.normal)
# log:WEBHOOK:message Logs the message to the specified webhook
# setvl:VL            Sets the player's VL for the category hack
# addvl:VL            Adds/Modifies the player's VL for the category hack
# NOTE: PLEASE use a delay for discord webhooks otherwise you might get autoblocked
#
# Conditions: (<, <=, =, !=, >=, >)
# If a condition is not fullfilled, none of the following actions will be run
# The ones with > you can replace with the appropriate operator
#
# vl>[Amo]           If the VL matches the threshold
# tps>[Amo]          If the server's TPS matches the threshold
# ping>[Amo]         If the player's ping matches (NOT RECOMMENDED) players can spoof their ping
# delay:[Delay]      Wait X milliseconds before executing the NEXT action (eg: kick a player if the last call of this was > 60 seconds ago)
# notdev             Will not run the next actions if the in dev mode
# isdev              Will run the next actions if in dev mode
# rnd:.40            Will run the actions 40% of the time
# 
# Placeholders:

# %player%  - The name of the player that was banned
# %uuid%    - The UUID of the player (-'s included)
# %nuuid%   - The UUID of the player (-'s not included)
# %check%    - What hack the player was banned for
# %debug%   - The debug ID of the check
# %vl%      - The VL of the hack that the player was at when they were banned
# %world%   - What world the player was in when they were banned, this may be null if they were offline
# %token%   - The ban token (only for ban)
# %server%  - The server name, useful for webhooks
#
# PAPI is also supported
#               -------------------------------
Actions:
  FastBreak:
  - 'basiclog|cancel|vl>100|tpsdecrement|delay:40000|tpskick|vl>400|delay:20000|lagkick|flog|log:FILE:Kicked %player% for %check%|tps>15|vl>600|cban'
  FastClimb:
  - 'basiclog|vl>50|delay:500|cancel|vl>200|cancel|vl>400|ikick|vl>600|cban'
  Blink:
  - 'basiclog|vl>200|delay:2000|cancel|delay:15000|tpsdecrement|tps>15|vl>250|lagkick|vl>500|cancel|flog|cban'
  NoSwing:
  - 'basiclog|vl>500|ikick|vl>1000|cban'
  Speed:
  - 'basiclog|rndcancel|vl>100|cancel|vl>800|addbanwave|vl>1200|cban'
  ElytraFlight:
  - 'basiclog|vl>500|ikick|vl>800|addbanwave|vl>1000|cban'
  Timer:
  - 'basiclog|vl>300|rndcancel|delay:10000|tpsdecrement|vl>500|lagkick|vl>600|ikick|vl>800|cban'
  KillAura:
  - 'basiclog|vl>200|ikick|vl>500|delay:120000|kick:Irregular Gameplay|vl>600|cban'
  Default:
  - 'basiclog|vl>20|cancel|vl>100|flog|vl>200|lagkick|tps>15|vl>400|ikick|vl>800|addbanwave|vl>1200|cban'
  # You can specify multiple actiongroups for one category
 #- 'vl>50|delay:10000|ccmd:say %player% is suspected of using %check%'
 # This would only kick players and decrement their VL by 200
 #- 'basiclog|vl>100|cancel|vl>600|ikick|addvl:-200'

# Commands are loaded and created in order. Define a custom command first before using it in another custom command.
Commands:
 #log Logs to a file that the player failed a check, and logs in console every 5 seconds that they failed the check
  flog: 'log:FILE:%player% failed %debug% (%vl%)|delay:5000|log:CONSOLE:%player% failed %debug%'
 #the below actions log ingame an appropriate warning message to staff
  alog: 'vl>100|vl<300|delay:10000|log:INGAME:&4&l[&c&lNOPE&4&l] &e%player% &7failed a &a%check%&7 check. (VL: &e%vl%&7)'
  elog: 'vl>300|vl<500|delay:10000|log:INGAME:&4&l[&c&lNOPE&4&l] &e%player% &7failed a &e%check%&7 check. (VL: &e%vl%&7)'
  clog: 'vl>500|vl<700|delay:10000|log:INGAME:&4&l[&c&lNOPE&4&l] &e%player% &7failed a &c%check%&7 check. (VL: &e%vl%&7)'
  4log: 'vl>700|delay:500|flog|delay:10000|log:INGAME:&4&l[&c&lNOPE&4&l] &e%player% &7failed a &4%check%&7 check. (VL: &e%vl%&7)'
 #weblog Logs the action to the specified webhook (in this case flagExample) 
  weblog: "notdev|vl>400|delay:60000|log:flagExample:"
 #basiclog combines all above log commands into 1 for simple usage
  basiclog: 'alog|elog|clog|flog|4log|weblog'
 #logban Logs ingame that the player was banned both ingame and to a file
  logban: 'log:INGAME:&4&l[&c&lNOPE&4&l] &c%player% &7was banned for &b%check%&7.|log:FILE:Banned %player% for %debug% %vl%|delay:5000|log:banExample:'
 #ikick Kicks the player once every minute (to avoid constant kicking) in case they are stuck/otherwise false flagging 
  ikick: 'delay:60000|kick:Irregular Gameplay'
 #lagkick Kicks the player if their ping is too high
  lagkick: 'ping>150|kick:You seem to be very laggy, please try restarting your connection.'
 #tpskick Kicks the player if the server's TPS is too low
  tpskick: 'tps<16|kick:The server is extremely laggy, please try waiting a bit before relogging.'
  tpsdecrement: 'tps<16|addvl:-50'
 #rndcancel Has an 80% chance of teleporting the player back
  rndcancel: 'rnd:.80|cancel'
  canimate: "logban|ban:2628000000:&4NOPE Anti-Cheat&r\n&7Token: &e%token%"
 #cban Only bans the player if dev mode is disabled, it also logs the ban
 # We log the ban first so we can get the VL data first
  cban: "notdev|delay:5000|animation:NOPE:canimate"
  addbanwave: "notdev|banwave:2628000000:&4NOPE Anti-Cheat&r\n&7Token: &e%token%"
Clone this wiki locally