ClicksPerSecond's logo

ClicksPerSecond v

What are they?

Actions are something like programmable block of code. ClicksPerSecond plugin uses actions to replace messy and large configuration with a simple and clear one. By using actions you are able to send titles, action bars, sounds, effects etc. to a player, for example when the player's CPS-test ends.

Specification:

Each action block is a list of strings, each string contains one action. Each action has this format:

Action format

[TYPE]value

So in summary, an action block looks like this:

Example actions from config.yml

example:
  - "[TYPE]value"
  - "[TYPE]value"
  ...

Above this list there's always a comment descibing when the action is run (and some useful information - placeholders...). Example action block:

Example action block from config.yml

start:
  once:
    - "[MESSAGE]&7[&bCPS&7] Click to start the test, or use &b/cpstest &7again to cancel the test."

Also, do pay attention to NOTE! and INFO! signs. They show you important information - what should be configured as what. They should not be ignored. Please note, that /// character sequence is reserved for separating action parameters. Therefore, they should not be used in any other form. If an action is specified wrongly, it will not be run.

Placeholder support:

PlaceholderAPI (if installed) is supported in action values. Also, as mentioned, in comments you can find which ClicksPerSecond's placeholders can be used, too. For example, if {cps_int} placeholder is allowed, you can set player's experience level to the value of the placeholder by using the placeholder as action's value - e.g. "[EXP_LEVEL]{cps_int}" (all specifications and formattings can be found below).

,,Once" and ,,permanent" actions:

Once actions are actions that will run only once on a certain event (for example when player clicks in a CPS-test).

Permanent actions are actions that are sent to player every 1 tick (0,05s) from and to a certain event (for example from the point where a CPS-test started to the player's first click).

Actions:

Actions are always executed towards certain player - CPS-test actions are executed towards the player doing the CPS-test.

Running a command as the player:

Action format

[COMMAND]command

Running a command as the console:

Action format

[CONSOLE_COMMAND]command

Sending a message to the player:

Action format

[MESSAGE]message

Sending a title message to the player:

Action format

[TITLE]title///sub-title///fade-in///stay///fade-out

Sending an actionbar message to the player:

Action format

[ACTIONBAR]message

Chatting as the player:

Action format

[CHAT]message

Spawning a particle effect to the player:

Spawns a particle effect at player's location which can be seen only by the player himself.

Action format

[PARTICLE]type

Spawning a public particle effect:

Spawns a particle effect at player's location which can be seen by everyone.

Action format

[PARTICLE_PUBLIC]type

Playing a sound effect to the player:

Plays a sound effect at player's location with the specified volume and speed. Sound can be heard only by the player himself.

Action format

[SOUND]type///volume///speed

Playing a public sound effect:

Plays a sound effect at player's location with the specified volume and speed. Sound can be heard by everyone.

Action format

[SOUND_PUBLIC]type///volume///speed

Setting player's experience level:

Sets player's experience to the specified level.

Action format

[EXP_LEVEL]level

Teleporting the player:

Teleports the player to the specified location (this action has two versions - one with yaw and pitch - facing - and the second one without these parameters).

Action formats

[TELEPORT]world///x///y///z
[TELEPORT]world///x///y///z///yaw///pitch