Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/main/java/ch/njol/skript/command/ScriptCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,13 @@ public Date getLastUsage(UUID uuid, Event event) {
} else {
String name = getStorageVariableName(event);
assert name != null;
return (Date) Variables.getVariable(name, null, false);
Object variable = Variables.getVariable(name, null, false);
if (!(variable instanceof Date)) {
Skript.warning("Variable {" + name + "} was not a date! You may be using this variable elsewhere. " +
"This warning is letting you know that this variable is now overridden for the command storage.");
return null;
}
return (Date) variable;
}
}

Expand Down