Skip to content

setBack

Elikill58 edited this page Sep 25, 2020 · 3 revisions

Custom set back

Now on V2, you have some available option to set custom back options.

General

(Don't forget to set the set_back.active to true)

set_back.action is the list of all actions to execute when setting back.

This is an example of action :

- "{\"type\":\"potion_effect\", \"key\":\"REGENERATION\", \"value\":\"10000:2\"}"
- "teleport:up:1"

How it works ?

2 ways :

  • With Json style

{"type":"setBackType", "key":"keyForSetback", "value":"valueForSetBack"}

  • With ":" separator

setBackType:keyForSetback:valueForSetBack

The type identify the name of the action

The key and values are specific of the set_back.

Potion Effect

Type: potion_effect

The key is the name of a potion effect, such as "Regeneration" or "Speed".

The value can be :

  • Empty. To keep default config : Infinite effect, level 1.
  • Time:Amplifier The time have to be in seconds, such as /effect command. The amplifier is also like the effect command.

Example:

  • potion_effect:speed: : Give Speed 1 effect.
  • potion_effect:blindness:20:2 : Give 20 seconds of Blindness II

Teleport

Type: teleport

The key refers to the direction of teleportation. It can be either :

  • UP : One block up.
  • DOWN : One block down.
  • CUSTOM : Set your own vector. Check below.

If you don't set key as custom, the value if the multiplier of the vector. For example, you set the key to "UP" and multiplicator to 3, the player will be teleported 3 block upper.

When you are using custom, you have to set the vector yourself. You need to use x,y,z. For example, to do like UP, you have to set value: 0,1,0.

Example :

  • teleport:down:5 : Teleport player 5 block below.
  • teleport:custom:0,5,8 : Teleport player 5 block up and 8 block in Z direction.

Value Editor

Type: value_editor

This setBack option enable you to edit some player's value. The key can be either :

  • gamemode : Edit the player gamemode. The the new one to the value.
  • velocity : Set a new velocity. The value is the new vector in this format: x,y,z.
  • damage : Damage the player. The value is the amount of damage. (can be with a comma).

Example :

  • value_editor:gamemode:specator : Set the player to spectator
  • value_editor:damage:2 : Remove 1 hearth to player