Source-checkedAdmin & protection

ConditionalCommands

by konsolas · for Minecraft

Execute commands only if certain conditions are met.

13KDownloads
6 yr agoLast updated
Spigot · PaperLoaders
1.16Latest game version

About ConditionalCommands

From SpigotMC

Execute commands only if certain conditions are met.

ConditionalCommands
Only execute a command if a condition is met.

ConditionalCommands is intended to be used when plugins have automatic commands that should only be executed if certain conditions are met. It is able to execute multiple commands, with customisable delays on each command.

Usage
/cc <player> unless <condition> do <command>
/cc <player> if <condition> do <command>
/cc help
/cc reload
/cc cooldown <arbitrarykey>

Alias: /ccmd

Conditions
Grammar of conditions:

<expression>::=<term>{<or><term>}
<term>::=<factor>{<and><factor>}
<factor>::=<comparison>|<not><factor>|(<expression>)
<comparison>::=<constant><comparator><constant>
<constant>::=floating point number or integer
<and>::='&'
<or>::='|'
<not>::='!'
<comparator>::='>'|'='|'<'

As shown above, only numbers can be compared, and placeholders can only consist of numbers. In case of multiple comparison operators in a group, i.e. 3>=<2, only the first operator will be used. Comparisons cannot include spaces. Inequality may be checked with !(value=value).

Examples:

/cc konsolas unless -ping->200 do kick konsolas
/cc konsolas if (-ping-<300&-ping->100)&-tps->15.0 do msg konsolas Your ping is between 300 and 100, and the TPS is greater than 15.

Placeholders
Placeholders are delimited by '-'. Since they're applied with a replace, errors will probably be detected during parsing if they are typed incorrectly.

  • 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> - 1.0 if the player has the permission, 0.0 otherwise. e.g. -perm:essentials.home-
  • perm_count:<permission> - number of players online who have <permission>
  • 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%-
  • cooldown:<arbitrarykey> - Returns time in seconds since the last execution of the /cc cooldown <arbitrarykey> command. Returns 43200 if /cc cooldown has never been executed for the given <arbitrarykey>.

    Never returns a value < 0.

    e.g. /cc if -cooldown:some_key->59 do /0/ cc cooldown some_key /0/ broadcast sent up to once every 60 seconds

    Maximum supported cooldown is 12 Hours aka 43200 seconds. Cooldowns are not saved to file, so they reset on server reload/restart. Use for example the player placeholder inside aac's configuration as part of the arbitrarykey.
Multi command / delayed commands
In the 'do' clause of the statement, multiple commands can be executed at once, and selected commands can be delayed if desired. The command delimiter is /<delay>/, where the integer between / and / denotes the delay before the command should be executed in ticks. Here are some examples:

/cc konsolas if -aacvl:heuristics->0 do /1200/ ban konsolas 1 minute delayed ban for killaura
/cc konsolas if -perm:some.permission-=1 do /0/ broadcast konsolas has some.permission! /0/ broadcast second broadcast! /20/ broadcast 1 second later!

Developer mode
By default, ConditionalCommands will suppress details behind parsing errors, etc. to be more user friendly. It will also swallow exceptions generated by executing a command. This behaviour can be changed by changing the dev option in plugins/ConditionalCommands/config.yml to true.

Highlights

From source data

Game versions

Supports 9 Minecraft versions, the newest being 1.16.

Loaders

Runs on Spigot and Paper.

Footprint

Rated a light load on a server.

ConditionalCommands on Nxeon

From our catalogue
One-click install
Supported on Nxeon Minecraft servers, for Paper servers. We download it from SpigotMC, place it, and restart the server.
Server side
Required on the server
Server type needed
Spigot, Paper
Server load
light
Smallest plan we suggest
Minecraft — 2 GB (2 GB RAM). This follows our own load rating above, not a benchmark.
Latest build
1.5, released 2021-02-14

Game versions by loader

LoaderGame versionsNewest
Paper1.8 to 1.16 (9 versions)1.16
Spigot1.8 to 1.16 (9 versions)1.16

From 10 recorded builds of ConditionalCommands.

Recent builds

BuildReleasedGame versionsLoaders
1.52021-02-141.8 to 1.16 (9 versions)Spigot, Paper
1.52021-02-13n/aSpigot, Paper
1.42017-07-08n/aSpigot, Paper
1.3.12017-05-20n/aSpigot, Paper
1.32017-05-20n/aSpigot, Paper
1.2.12016-12-25n/aSpigot, Paper

Run ConditionalCommands on a Minecraft server

Pick a server or deploy a new one above; it is installed in one click.

What kind of mod it is

From the catalog
Listed on SpigotMC as “Admin”

Admin & protection

Permissions, moderation, anti-cheat and land protection for the people running the server.

Runs on your server

From source side support

SpigotMC lists ConditionalCommands as required on the server. Check its SpigotMC page to see whether players need it too.

Compatibility

Game
Minecraft
Loaders
SpigotPaper
Runs on
Serverrequired on the server
Game versions
1.16 and 8 earlier
Requires
One-click install needs a Paper server.

Verified at the source

  • ✓SpigotMCOfficial listing, checked 2026-10-02Open ↗
  • ✓Authorkonsolas, as published on SpigotMC
  • ✓LicenseNot published by the sourceFree

ConditionalCommands, answered

Generated from the mod’s own source data.

Do my players need to install ConditionalCommands?

SpigotMC lists ConditionalCommands as required on the server. Check its SpigotMC page to see whether players need it too.

Which loaders does it support?

Spigot and Paper.

Is it free?

Yes. ConditionalCommands is free to download from SpigotMC.

How do I add it to my Nxeon server?

Use “Add to a server” on this page, or open NxLabs from your dashboard. We install it, restart your server and switch it on.

NxLabs

Run ConditionalCommands on a Minecraft server.

Deploy in about a minute from $4.99 a month, then add ConditionalCommands in one click.