Filter issue with lored items in an inventory #3905
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).
Description
Attempted to set a list to all items in an inventory that had a lore, however this list will always return empty when using a filter. Have attempted numerous times with different layouts, none of which have worked apart from looping.
Steps to Reproduce
With a couple of items with a lore in your inventory, do this:
on inventory close:
set {_a::*} to all items in player's inventory where [lore of input is set]
broadcast "%{_a::*}%"
This will always return an empty list, however when attempting the same code with named items
on inventory close:
set {_a::*} to all items in player's inventory where [name of input is set]
broadcast "%{_a::*}%"
It functions as it should and returns correctly
You can loop to work around this, but I thought it might be worth reporting incase it has other implications.
Expected Behavior
Should not be returning an empty list if your inventory has lored items inside it
Server Information
Skript 2.5.3
Paper 1.16.5
Extra comments
Funnily enough, this filter works for removing non lored items from the list, which I find quite interesting as it is very similar.
on inventory close:
set {_a::*} to all items in player's inventory
remove ({_a::*} where [lore of input is not set]) from {_a::*}
broadcast "%{_a::*}%"
Thanks for reading :)
The text was updated successfully, but these errors were encountered: