Prevent non item materials from creating itemstacks
Fusezion opened this issue ยท 1 comments
Suggestion
If Material#isItem
returns false prevent the result from outputting an itemstack in getRandom
and getAll
.
Why?
A huge issue skript has suffered from is when an item that isn't labeled an item is used as an item an example of this is oak wood wall sign
when attempting to either give a player the sign or set a gui to these items rather than setting to an item they just become air. This design is fine however in cases like set slot 0 of {_inv} to oak sign
it should instead only pick random out of valid items aka filter isItem
results
Other
Honestly this is something bukkit should be doing but that will almost never happen since this has been like this forever as such I believe it's fine for skript to control this themselves.
example of what they output for #isItem
The issue is more so a proposal but is still probably a design that's fine in 80% of uses the only time it shouldn't filter is in item comparisons and when setting a variable to every oak sign
or similar items, which is something that should easily be controllable
Agreement
- I have read the guidelines above and affirm I am following them with this suggestion.
Duplicate of #5586