ConditionalCommands 1.4

Execute commands only if certain conditions are met.

  1. konsolas
    Tested Minecraft Versions:
    • 1.8
    • 1.9
    • 1.10
    • 1.11
    • 1.12
    Source Code:
    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.

    /cc <player> unless <condition> do <command>
    /cc <player> if <condition> do <command>
    /cc help

    Grammar of conditions:

    <constant>::=floating point number or integer

    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).


    /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 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-
    • 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%-
    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.

Recent Reviews

  1. JasperWorld
    Version: 1.4
    i posted my old review when I was fucking stupid so here's a new one.

    this plugin is actually really nice lol.
  2. SladeHazard
    Version: 1.4
    idiot below me. i thought it was atleast 80 chracters................ how old is his post? delete it any mod btw plugin is awesome
  3. Cisnet
    Version: 1.4
    idiot below me .
  4. oneaddictions
    Version: 1.4
    Theress No 1.7 / 1.7.10 support, I need this for my anticheat which is 1.7 and 1.8! but my server is 1.7!
    1. konsolas
      Author's Response
      It's open source, feel free to PR 1.7 support.
  5. millmilla
    Version: 1.4
    Great plug-in for my use, the dev is also really helpful and it's perfect if paired with EventCmds
  6. HexedHero
    Version: 1.4
    Great plugin that works for many things, especially along side AAC! Highly Recommend!
  7. PowerfulCookie1
    Version: 1.4
    AWESOME PLUGIN! HELPED ME CREATE A RANK SYSTEM! If there was more placeholders...
  8. ScuroK
    Version: 1.4
    AWESOME!!! I was loosing my mind because i had some problems with other plugins running commands at once. YOur plugin saved my as!! thank you soooo much <3
  9. OpenSource
    Version: 1.4
    Awesome plugin. Works really great with AAC and other anticheats like Spartan! I really like it :) and its good to see plugin like this still up to date and getting updates
  10. PinchCraft
    Version: 1.3.1
    Awesome review, works well with many anti-cheats, but PLEASE add more command aliases, it conflicts with many crate plugins.
    1. konsolas
      Author's Response
      /ccmd conflicts with crate plugins?