Pre-set cooldown storage variable causes ClassCastException #5935
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: low
Issues that are not harmful to the experience but are related to useful changes or additions.
Skript/Server Version
Bug Description
When using a variable for
cooldown storage
, if the variable is already set to anything that is not a date, running the command will cause getLastUsage() to throw a ClassCastException.Due to unchecked cast on line 477 of ScriptCommand:
Expected Behavior
getLastUsage() should interpret any non-dates as if they did not exist, aka as not having been used before.
Steps to Reproduce
Errors or Screenshots
Other
No response
Agreement
The text was updated successfully, but these errors were encountered: