Skip to content
MaxDikiy edited this page May 16, 2017 · 4 revisions

This activator is triggered when the player switches sneaking mode (turns off squatting).

To create this activator, use the command:

/react add SNEAK <ActivatorName> [sneak]

Item Possible Values ​​ Description
[sneak] sneak:<TRUE/FALSE/ANY> The sneak mode, which will track the activator.
The default is sneak:ANY. This means that the activator will work at any mode switching.

Temporary placeholders operating in this activator:

Placeholder Description
%sneak% Shows the sneaking mode of the player (TRUE/FALSE).

Examples

  1. Prohibit the player's movement in sneaking mode:
    /react add SNEAK s sneak:true
    /react add s a WALK_SPEED speed:0
    /react add s a MESSAGE &cYou are not allowed to move when you sneak.
    or
SNEAK:
  s:
    sneak: TRUE
    actions:
    - WALK_SPEED=speed:0
    - MESSAGE=&cYou are not allowed to move when you sneak.
  1. Restore the player's movement speed when disabling sneaky mode:
    /react add SNEAK s2 sneak:false
    /react add s2 a WALK_SPEED speed:2
    /react add s2 a MESSAGE &aYour speed has recovered.
    or
SNEAK:
  s2:
    sneak: FALSE
    actions:
    - WALK_SPEED=speed:2
    - MESSAGE=&aYour speed has recovered.
  1. Recognize the moment of switching sneaking mode:
SNEAK:
  s3:
    sneak: ANY
    actions:
    - broadcast=&ePlayer &a%player%&eggles the sneaking mode on &c&l%sneak%
Clone this wiki locally