Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event handler ignore cancel doesn't work #154

Open
AzonFR opened this issue May 28, 2020 · 11 comments
Open

Event handler ignore cancel doesn't work #154

AzonFR opened this issue May 28, 2020 · 11 comments
Labels
help wanted Issues that would be easy for a new contributor to resolve type: bug

Comments

@AzonFR
Copy link

AzonFR commented May 28, 2020

On my server, i have Factions and WorldGuard and when i use this script:
https://pastebin.com/D3hMASxX
I can listen to the event but when i'm in warzone (build is disabled) or in a region where build is disabled, the script don't work and i don't know why ?

Server information

  • skript-mirror: 0.19.1
  • Skript: 2.2-dev36
  • Bukkit: PaperSpigot 1.8.8
  • Java: 8
  • OS: Ubuntu 18.04
@AzonFR
Copy link
Author

AzonFR commented Jun 8, 2020

so @btk5h , do you have an idea ? ...

@btk5h
Copy link
Owner

btk5h commented Jun 8, 2020

Not enough information to reproduce, can you post more information (plugin versions, setting up regions, etc.) on how to replicate this on a fresh server?

@AzonFR
Copy link
Author

AzonFR commented Jun 8, 2020

I'll try to replicate this on a fresh server, i tell you

@AzonFR
Copy link
Author

AzonFR commented Jun 11, 2020

Hey, i just try on a 1.12.2 PaperSpigot version, clean install, skript version 2.2-dev36
I didn't work, when the event isn't cancelled, it broadcast "Azon_FR" but when the event is cancelled (by WorldGuard here) there is no broadcast
Code: https://pastebin.com/NkG4piZH
So i try with the latest version of Skript (https://github.com/SkriptLang/Skript/releases) (2.5) and still the same problem
Versions: https://gyazo.com/3e43f4d26785bc261789a99c9b1968c9
Issue: https://gyazo.com/d3552506bb68babb12b04a5759e92d6c
There is no error in the console

@AzonFR
Copy link
Author

AzonFR commented Jun 12, 2020

bump

@AzonFR
Copy link
Author

AzonFR commented Jun 17, 2020

bump :/

@btk5h
Copy link
Owner

btk5h commented Jun 18, 2020

I have my suspicions on what could be causing this, does your script work if you remove the "all" keyword?

@AzonFR
Copy link
Author

AzonFR commented Jun 19, 2020

Yes it work but when the event is cancelled, it don’t work. So it’s the
same as if i add "all"

@btk5h
Copy link
Owner

btk5h commented Jun 21, 2020

Anyone looking into this issue might want to look into making sure the ignoreCancelled flag is being set properly

boolean ignoreCancelled = (parseResult.mark & 1) == 1;

and make sure the ignoreCancelled flag actually works when registering an event.
.registerEvent(event, listener, priority, executor, SkriptMirror.getInstance(), ignoreCancelled);

@btk5h btk5h added help wanted Issues that would be easy for a new contributor to resolve type: bug labels Jun 21, 2020
@AzonFR
Copy link
Author

AzonFR commented Jun 25, 2020

Thanks for help, so i have to wait for an update?

@AzonFR
Copy link
Author

AzonFR commented Jul 1, 2020

up ^^

TPGamesNL added a commit to SkriptLang/skript-reflect that referenced this issue Jul 3, 2020
Fixed:
#21
#19
#7
btk5h/skript-mirror#122 (the warning, but that was the only thing wrong with it)
btk5h/skript-mirror#154 (partly, see #22)
Added:
warnings for using features that require consent when no consent is given
cancellability for custom events (see https://skript-mirror-tp.gitbook.io/skript-mirror-tp/advanced/custom-syntax/events#calling-the-event)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Issues that would be easy for a new contributor to resolve type: bug
Projects
None yet
Development

No branches or pull requests

2 participants