Dedicated Minecraft Server Hosting
  • Minecraft Server Docs
  • Basic Server Setup
    • How to Join a Minecraft Server
    • How to Adding Sub-users
    • How to Server Icon
    • How to Upload Files using SFTP
    • How to Creating MySQL Databases
    • How to Enable command Blocks
    • How to Install jar file
    • How to Upload Custom Minecraft Map
    • How to setup a server whitelist
    • How to setup and use Gamerules
    • How to setup a Reverse Proxy
    • How to set a custom MOTD
  • plugins
    • EssentialsX
    • Vault
    • LuckPerms
    • CoreProtect
    • Litebans
    • GriefPrevention
    • Advanced Anti-Cheat
    • Conditional Commands
    • AdvancedBan
    • Chunky
    • DiscordSRV
    • viaversion
    • Citizens 2
    • Prism
    • dynmap
    • CraftingStore
    • ServerNPC
    • Spark
    • Votifier
    • WorldEdit
    • Multiverse
    • Milk
    • GeyserMC
    • BungeeGuard
  • Scheduling Actions
  • Creating a Reverse Proxy
  • Resetting your world
  • Serverwide Resource Packs
  • Adding MySQL Databases
  • Setting Up Fabric
  • template
  • Installing Fabric mods on your server
  • DedicatedMinecraft Docs Overview
  • Installing Forge mods on your server
  • Server Optimization Guide
  • fabric_mods
    • LuckPerms
    • Chunky
    • Performance Mods
  • Basic Controls
  • Setting Up Forge
  • How to change your MOTD
  • Creating Backups
  • Installing Plugins on your server
  • Datapacks
  • Subusers
  • Editing Account Details
  • 2-Factor Authentication
  • Adding an icon to your server.
  • Using A Domain
  • How to use SFTP to transfer files
  • Contributing to the dedicatedminecraft.host documentation
  • change-java-version
  • How to take a Timings Report
  • Server Jars
  • File Manager Controls
  • SRVControl
  • Adding admin to minecraft server
Powered by GitBook
On this page
  • Introduction to how all anticheat plugins work:
  • Why you should use conditional commands and what it does:
  • Usage
  • Info

Was this helpful?

Edit on Git
  1. plugins

Conditional Commands

A solution to add conditional commands to Minecraft, allowing more configurability with automated actions

Introduction to how all anticheat plugins work:

  • Anticheat plugins have various "checks" that detect cheating (say if a player is going above a certain speed limit)

    • When these checks are triggered, the anticheat adds "VL" or violation level points to the offender

    • All anticheats are configurable to execute a certain command (notify, kicking, or banning a player) at a certain violation level

  • However, sometimes a player may be lagging, and the kicking/banning command by itself does not account for this lag, resulting in false kicks/bans and complaints

Why you should use conditional commands and what it does:

  • Conditional commands are a command that has parameters like ping, tps, etc. tied to an actual executed command

  • Let's say you wanted a player to be kicked for hacking when they reach a certail violation level (VL) in your anticheat configuration, conditional commands will let you kick that player ONLY if their ping is below a certain threshold

    • This means that you are able to exempt laggy players with high ping or when server TPS is low from getting false kicked/banned

Usage

:::caution Although the plugin page says the plugin was only tested up to 1.12, conditional commands works without issue on all server versions due to its simplicity. Versions such as 1.16.3 have been tested to work on numerous servers :::

Install conditional commands by dragging it into your plugin folder, and restart your server.

Basic commands you can use are: /cc [player] unless [condition] do [command] /cc [player] if [condition] do [command] /cc help

These are the conditions you can use:

  • ping - The latency of the tested player.

  • tps - Server TPS average over the last 2 seconds

  • time_online - Player's online time in milliseconds

  • uptime - Server uptime in ticks

  • player_count - Number of players on the server

  • perm:<permission> - returns 1.0 if the player has the permission, returns 0.0 otherwise. e.g. -perm:essentials.home-

  • aacvl:<check> - AAC violation level of the given check (internal name). e.g. -aacvl:speed-

  • chance:<percentage>% - Will be 1.0 percentage% of the time. e.g. -chance:34.5%-

:::important

You need to surround your "condition" (tps, ping, etc.) that you chose from the list above with dashes, so if you were to check for ping for example, "-ping-" would be what the syntax is

:::

Examples of conditional commands:

  • /cc iLoveDucks unless -ping->200 do kick iLoveDucks

    • This command when executed, will kick the player 'iLoveDucks' unless their ping is above 200ms, meaning that laggy players will not get kicked should you use conditional commands

:::important If you are configuring an anticheat, it's best practice to have a test server (even a local one if getting a hosted one isn't an option) to test your anti-cheat configuration before deploying :::

Info

PreviousAdvanced Anti-CheatNextAdvancedBan

Last updated 4 years ago

Was this helpful?

Spigot Page