Skip to content

Commit 06878b5

Browse files
authored
Fix Incorrect Command Cooldown Storage Warning (#8304)
fix incorrect warning
1 parent e06d209 commit 06878b5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/ch/njol/skript/command/ScriptCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ public Date getLastUsage(UUID uuid, Event event) {
533533
String name = getStorageVariableName(event);
534534
assert name != null;
535535
Object variable = Variables.getVariable(name, null, false);
536-
if (!(variable instanceof Date)) {
536+
if (variable != null && !(variable instanceof Date)) {
537537
Skript.warning("Variable {" + name + "} was not a date! You may be using this variable elsewhere. " +
538538
"This warning is letting you know that this variable is now overridden for the command storage.");
539539
return null;

0 commit comments

Comments
 (0)