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

Player is an itemtype | ClassInfo compared against ClassInfo #5723

Closed
TheLimeGlass opened this issue May 30, 2023 · 1 comment
Closed

Player is an itemtype | ClassInfo compared against ClassInfo #5723

TheLimeGlass opened this issue May 30, 2023 · 1 comment
Labels
won't fix Intended behaviour of Skript/MC, not fixable or not planned

Comments

@TheLimeGlass
Copy link
Collaborator

TheLimeGlass commented May 30, 2023

Skript/Server Version

2.7.0-beta2
Paper 1.19.4

Bug Description

on script load:
	if a string is an itemtype:
		broadcast "wat"

on script load:
	if player is an itemtype:
		broadcast "wat"

on script load:
	if timespan is an itemtype:
		broadcast "wat"
	if timespan is a player:
		broadcast "wat"

parses correctly and prints wat

Expected Behavior

This condition should not pass.

The player classinfo compared against another classinfo is concerning as I can tell Skripters could run into that issue when player is not present in an event.

Note this is unrelated to #5503

@TheLimeGlass TheLimeGlass 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. priority: medium Issues that are detrimental to user experience (prohibitive bugs or lack of useful implementation). and removed priority: low Issues that are not harmful to the experience but are related to useful changes or additions. labels May 30, 2023
@TheLimeGlass TheLimeGlass changed the title String is an itemtype Player is an itemtype | ClassInfo compared against ClassInfo May 30, 2023
@UnderscoreTud
Copy link
Member

It broadcasts "wat" because a string is referring to the string item. Not because a player is an itemtype which is what your issue suggests. Maybe you should use different debug messages for different checks? So you know which is passing and which isn't.

@UnderscoreTud UnderscoreTud added invalid Not a Skript issue, already implemented, does not apply, etc. and removed 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 19, 2023
@UnderscoreTud UnderscoreTud closed this as not planned Won't fix, can't repro, duplicate, stale Jul 19, 2023
@UnderscoreTud UnderscoreTud added won't fix Intended behaviour of Skript/MC, not fixable or not planned and removed invalid Not a Skript issue, already implemented, does not apply, etc. labels Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
won't fix Intended behaviour of Skript/MC, not fixable or not planned
Projects
None yet
Development

No branches or pull requests

2 participants