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 Report for on right click event with named item #4163

Closed
1 task done
LogOfCam opened this issue Jul 5, 2021 · 2 comments
Closed
1 task done

Bug Report for on right click event with named item #4163

LogOfCam opened this issue Jul 5, 2021 · 2 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: medium Issues that are detrimental to user experience (prohibitive bugs or lack of useful implementation).

Comments

@LogOfCam
Copy link

LogOfCam commented Jul 5, 2021

Skript/Server Version

2.6-beta2

Bug Description

https://pastebin.com/eWe1CAvs (Sorry if I wasn't supposed to put this here)

Following the PasteBin above, it should output "F" only if the player has an ender chest named "&7Box" but it still works with a regular ender chest (no name: &7Box).

Expected Behavior

To output "F" and cancel the event, which it does but when the ender chest is named "&7Box" and not a normal ender chest named "&fEnder Chest" (default name).

Steps to Reproduce

https://pastebin.com/eWe1CAvs (provided again)

I tested it twice, the first time was with other plugins, and SkQuerey, my second test was a new server run with only Skript itself, no other plugins added.

Errors or Screenshots

https://gyazo.com/86a3ee7a4d986192906feae00faca6fc

Other

No response

Agreement

  • I have read the guidelines above and confirm I am following them with this report.
@APickledWalrus
Copy link
Member

APickledWalrus commented Jul 5, 2021

https://github.com/SkriptLang/Skript/blob/master/src/main/java/ch/njol/skript/conditions/CondItemInHand.java should just use the Comparators method for this - other comparison methods are somewhat unreliable. I will likely work this into #4162

As a workaround, you can use:

if player's tool is an ender chest named "&7Box":

Let me know if this works for you. Thanks for the report.

@APickledWalrus APickledWalrus added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: medium Issues that are detrimental to user experience (prohibitive bugs or lack of useful implementation). labels Jul 5, 2021
APickledWalrus added a commit to APickledWalrus/Skript that referenced this issue Jul 5, 2021
@LogOfCam
Copy link
Author

LogOfCam commented Jul 5, 2021

Thank you for the quick response for a workaround but yes it does seem to work with what you provided, not to distract you too much as it may just be something I have to work around but if the ender chest is in a stack in the player's hand it won't output "F", less you have 1 ender chest in your hand.

Thank you!

@APickledWalrus APickledWalrus added the PR available Issues which have a yet-to-be merged PR resolving it label Jul 6, 2021
@TPGamesNL TPGamesNL 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 30, 2021
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: medium Issues that are detrimental to user experience (prohibitive bugs or lack of useful implementation).
Projects
None yet
Development

No branches or pull requests

3 participants