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

[BUG] Skript ignores event cancellation. #5752

Closed
1 task done
ghost opened this issue Jun 22, 2023 · 6 comments
Closed
1 task done

[BUG] Skript ignores event cancellation. #5752

ghost opened this issue Jun 22, 2023 · 6 comments
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.

Comments

@ghost
Copy link

ghost commented Jun 22, 2023

Skript/Server Version

Server Version: git-Paper-448 (MC: 1.19.3) 
Skript Version: 2.6.4 
Installed Skript Addons:
- Skellet v2.0.9 
-skRayFall v1.9.28 
- SkQuery v4.1.9 
- SkBee v2.8.2 
Installed dependencies: 
- Vault v1.7.3-b131 
- WorldGuard v7.0.7+216b061

Bug Description

Skript ignores event cancellation. When a plugin like CommandWhitelist tries to cancel the event, it doesn’t work. Source: YouHaveTrouble/CommandWhitelist/issues/73

Expected Behavior

Skript's no permission message shouldn't show.

Steps to Reproduce

  1. Get CommandWhitelist for Bukkit (https://www.spigotmc.org/resources/commandwhitelist-spigot-waterfall-velocity.81326/).
  2. Put CommandWhitelist's .jar file in the plugins folder.
  3. Make this code with the file name test.sk:
command /test:
  permission: permission.test
  trigger:
    send "test" to player
  1. Save your file and do /sk reload test.
  2. CommandWhitelist's configured no such command message will popup and Skript's no permission message.

Errors or Screenshots

No response

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this report.
@TheLimeGlass
Copy link
Collaborator

TheLimeGlass commented Jun 22, 2023

This is because Skript is NOT actually making a server registered command. Skript just listens within a on chat/command event when the phase is said /test. This is how you can dynamically make commands just by reloading a script.

If you wish for Skript to take priority over the plugin in question. Change the event priority of Skript in the config.sk to something higher or you can even use the priority pattern after any event with [with priority (lowest|low|normal|high|highest|monitor)]

Please explain what you are trying to do with Skript in this regards, as we do not know the purpose of CommandWhitelist.

@TheLimeGlass TheLimeGlass added the waiting for reply The report needs a response from the reporter to determine course of action. label Jun 22, 2023
@ghost
Copy link
Author

ghost commented Jun 22, 2023

CommandWhitelist (https://www.spigotmc.org/resources/commandwhitelist-spigot-waterfall-velocity.81326/) is for blocking command execution and tab completion. Skript will still show the no permission message when CommandWhitelist cancels the event. I tried to make skript lower priority which didn't work.

@sovdeeth
Copy link
Member

sovdeeth commented Sep 3, 2023

image
Yes, Skript ignores all cancellations when listening for commands to run. I don't think it should do this, but I haven't investigated as to why it ignores cancellations yet.

@sovdeeth sovdeeth added investigating The core developers are currently investigating this issue. Usually used for complex cases. and removed waiting for reply The report needs a response from the reporter to determine course of action. labels Sep 3, 2023
@sovdeeth sovdeeth added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: low Issues that are not harmful to the experience but are related to useful changes or additions. PR available Issues which have a yet-to-be merged PR resolving it and removed investigating The core developers are currently investigating this issue. Usually used for complex cases. labels Sep 3, 2023
@sovdeeth
Copy link
Member

sovdeeth commented Sep 3, 2023

@JeffreyRCGithub Try this nightly jar for 2.7: https://github.com/SkriptLang/Skript/actions/runs/6066909722
I can make you one for 2.6.4 if you can't test on 2.7 for some reason.

@ghost ghost closed this as completed Oct 25, 2023
@UnderscoreTud UnderscoreTud reopened this Oct 26, 2023
@UnderscoreTud
Copy link
Member

We usually leave issues open until a version that contains the fix/feature is released.

@sovdeeth
Copy link
Member

We usually leave issues open until a version that contains the fix/feature is released.

It should actually have been included in 2.7.1 I believe, it was cherrypicked from the feature branch to the patch branch. So it should be good to close now. I forgot about it in favor of the other issue #5966 fixed.

@sovdeeth sovdeeth added completed The issue has been fully resolved and the change will be in the next Skript update. and removed PR available Issues which have a yet-to-be merged PR resolving it labels Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.
Projects
None yet
Development

No branches or pull requests

3 participants