Skript

Skript

743k Downloads

Cancelling `on swim toggle` does not work

mugu2006 opened this issue ยท 3 comments

commented

Skript/Server Version

[19:26:06 INFO] [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases

[19:26:06 INFO] [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/

[19:26:06 INFO] [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials

[19:26:06 INFO] [Skript] Server Version: 1.21.1-65-21f125f (MC: 1.21.1)

[19:26:06 INFO] [Skript] Skript Version: 2.9.2 (skriptlang-github)

[19:26:06 INFO] [Skript] Installed Skript Addons:

[19:26:06 INFO] [Skript] - SkBee v3.6.1 (https://github.com/ShaneBeee/SkBee)

[19:26:06 INFO] [Skript] Installed dependencies:

[19:26:06 INFO] [Skript] - WorldGuard v7.0.11-beta1+a801a9d

Bug Description

Title explains it, cancelling the on swim toggle event does nothing, it is detected but not cancelled

Expected Behavior

I'd assume the swimming should have been cancelled and I would remain non-swimming

Steps to Reproduce

    cancel event```
 Use that code, go in water, try to start swimming

### Errors or Screenshots

-

### Other

-

### Agreement

- [X] I have read the guidelines above and affirm I am following them with this report.
commented

Just learned it can't be cancelled, even though the docs and example state it can.

commented

It's not the fact it can't be cancelled just more so the fact it doesn't do much of anything this is taken from javadocs for the event

Deprecated.
This does nothing, the server and the client doesn't work correctly when the server try to bypass this. A current workaround exists. If you want to cancel the switch from the ground state to the swimming state you need to disable the sprinting flag for the player after the cancel action.

commented

Breh, code I put in steps to reproduce didn't go in, here it is;
on swim toggle:
cancel event
Yes, indents are correct, idk how to put them in on GitHub