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

CondIsTagged uses getArray instead of getAll #7471

Open
1 task done
Envqu opened this issue Jan 18, 2025 · 3 comments · May be fixed by #7474
Open
1 task done

CondIsTagged uses getArray instead of getAll #7471

Envqu opened this issue Jan 18, 2025 · 3 comments · May be fixed by #7474
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. PR available Issues which have a yet-to-be merged PR resolving it

Comments

@Envqu
Copy link

Envqu commented Jan 18, 2025

Skript/Server Version

[17:37:45 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[17:37:45 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[17:37:45 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[17:37:45 INFO]: [Skript] Server Version: 1.21.3-2358-16ce24a (MC: 1.21.3)
[17:37:45 INFO]: [Skript] Skript Version: 2.10.0 (skriptlang-github)
[17:37:45 INFO]: [Skript] Installed Skript Addons: 
[17:37:45 INFO]: [Skript]  - SkBee v3.8.1 (https://github.com/ShaneBeee/SkBee)
[17:37:45 INFO]: [Skript]  - SkQuery v4.1.10
[17:37:45 INFO]: [Skript]  - skript-placeholders v1.7.0 (https://github.com/APickledWalrus/skript-placeholders)
[17:37:45 INFO]: [Skript]  - skript-db v1.3.9
[17:37:45 INFO]: [Skript] Installed dependencies: 
[17:37:45 INFO]: [Skript]  - Vault v1.7.3-b131
[17:37:45 INFO]: [Skript]  - WorldGuard v7.0.13-beta-1+2f13ae0

Bug Description

There is like 10% chance that message will be sent to player.
Skript doesnt recognize item tags every time.
It never happened with "any shulker box" or "any trapdoor".

Expected Behavior

Recognize item tag every time.

Steps to Reproduce

on rightclick:
	player's world = "spawn"
	#player doesn't have permission "*"
	if event-block is item frame or glow item frame or armor stand or brewing stand or hopper or barrel:
		send "test a" to player
		cancel event
	if event-block is tagged as item tag "shulker_boxes" or "doors" or "trapdoors" or "pots" or "gates" or "furnaces":
		send "test b" to player
		cancel event

Errors or Screenshots

No response

Other

No response

Agreement

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

This is being interpreted as item tag ("a" or "b" or "c") which is a random choice between a. b, and c
If you want to compare all, use tag "shulker_boxes" or tag "doors" or tag "trapdoors"...

@sovdeeth sovdeeth closed this as not planned Won't fix, can't repro, duplicate, stale Jan 18, 2025
@Envqu
Copy link
Author

Envqu commented Jan 18, 2025

This is being interpreted as item tag ("a" or "b" or "c") which is a random choice between a. b, and c If you want to compare all, use tag "shulker_boxes" or tag "doors" or tag "trapdoors"...

if event-block is tagged as item tag "shulker_boxes" or tag "doors" or tag "trapdoors" or tag "pots" or tag "fence_gates" or tag "furnaces":
like this? it still random choice

@sovdeeth
Copy link
Member

Ah whoops yeah Made a mistake with the condition, it should be using getAll and not getArray. I'll fix it for 2.10.1. Thanks

@sovdeeth sovdeeth reopened this Jan 18, 2025
@sovdeeth sovdeeth changed the title Aliases and tags CondIsTagged uses getArray instead of getAll Jan 18, 2025
@erenkarakal erenkarakal added the PR available Issues which have a yet-to-be merged PR resolving it label Jan 19, 2025
@Efnilite Efnilite added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Jan 20, 2025
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. PR available Issues which have a yet-to-be merged PR resolving it
Projects
None yet
4 participants