9
0
mirror of https://github.com/WiIIiam278/HuskSync.git synced 2025-12-25 09:39:18 +00:00

Support MC 1.20.4, improve timestamp exceptions

This commit is contained in:
William278
2023-12-10 15:33:38 +00:00
parent 8fad075357
commit 5ec0f1b098
2 changed files with 5 additions and 2 deletions

View File

@@ -503,7 +503,10 @@ public class DataSnapshot {
@NotNull
public Builder timestamp(@NotNull OffsetDateTime timestamp) {
if (timestamp.isAfter(OffsetDateTime.now())) {
throw new IllegalArgumentException("Data snapshots cannot have a timestamp set in the future");
throw new IllegalArgumentException("Data snapshots cannot have a timestamp set in the future! "
+ "Make sure your database server time matches the server time.\n"
+ "Current game server timestamp: " + OffsetDateTime.now() + " / "
+ "Snapshot timestamp: " + timestamp);
}
this.timestamp = timestamp;
return this;