ConditionalActions

Custom commands with different types of actions & conditions.

83

ConditionalActions

Commands

`conditionalactions.admin` is required to run commands (will most likely be changed) - /ca reload - /ca condition list - /ca condition check <player|--console> <condition> - /ca group list - /ca group execute <player|--console> <action group> - /ca execute <player|--console> <action>

Action types

`/ca execute <player>` and it'll suggest all available actions with their arguments You can also check the code for all supported actions for now until I add a proper documentation. The `bungeeplayer` & `bungeeconsole` actions are only available if you install the plugin on BungeeCord as well (a simple drag&drop should suffice)

Default configs

Commands

```yml mycoolcommand: aliases: - mycoolcmd - coolcommand - coolcmd actions: - "msg: <green>Heya <dark_green>%player_name%</dark_green>! Cool command right?"

restart: actions: - "msg: %conditionalactions_args% %conditionalactions_args-size% %conditionalactions_arg-0% %conditionalactions_arg-1%" - condition: "is_op" deny: - "msg: <red>You don't have the permission to run this command!" - return - condition: "%conditionalactions_args%!==" success: - condition: "%conditionalactions_arg-0% >= 1" success: - "msg: <gray>Restarting the server in <dark_red>%conditionalactions_arg-0%</dark_red> seconds!" - "delay: %math_0_{conditionalactions_arg-0}*1000%" deny: - "msg: <red>"%conditionalactions_arg-0%" is not a valid number!" - return - "group: restart"

```

Action groups

```yml restart: - "broadcast: <dark_red>SERVER WILL RESTARTING IN <red>10</red> seconds!" - "delay: 5000" - "broadcast: <dark_red>SERVER WILL RESTARTING IN <red>5</red> seconds!" - "delay: 1000" - "broadcast: <dark_red>SERVER WILL RESTARTING IN <red>4</red> seconds!" - "delay: 1000" - "broadcast: <dark_red>SERVER WILL RESTARTING IN <red>3</red> seconds!" - "delay: 1000" - "broadcast: <dark_red>SERVER WILL RESTARTING IN <red>2</red> seconds!" - "delay: 1000" - "broadcast: <dark_red>SERVER WILL RESTARTING IN <red>1</red> seconds!" - "delay: 1000" - "broadcast: <dark_red>RESTARTING..." - "console: stop" test: - "msg: Start" - condition: "%player_name%==Tanguygab" success: - "msg: Hi me!" - "msg: How's it going?" deny: "msg: Who are you? o_O" - "msg: End" ```

Conditions

```yml conditions: is_op: "%player_is_op%=yes" # simple conditions is_admin: # OR checks - "%player_is_op%=yes" - "permission:group.admin" - "permission:*" has_money_and_vip: # AND checks - - "%vault_eco_balance%>=1000" - "permission:group.vip"

alternatively:

is_admin: "%player_is_op%=yes || permission:group.admin || permission:*" has_money_and_vip: "%vault_eco_balance%>=1000 && permission:group.vip" ```

ADS