diff --git a/pom.xml b/pom.xml index c52c71c..495d7b1 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ cn.lunadeer EssentialsD - 1.22.0 + 1.22.1 jar EssentialsD diff --git a/src/main/java/cn/lunadeer/essentialsd/dtos/LoginRecord.java b/src/main/java/cn/lunadeer/essentialsd/dtos/LoginRecord.java index ba4a11a..716edbb 100644 --- a/src/main/java/cn/lunadeer/essentialsd/dtos/LoginRecord.java +++ b/src/main/java/cn/lunadeer/essentialsd/dtos/LoginRecord.java @@ -6,6 +6,7 @@ import org.bukkit.entity.Player; import java.net.InetSocketAddress; import java.sql.ResultSet; +import java.sql.Timestamp; import java.util.UUID; public class LoginRecord { @@ -32,8 +33,8 @@ public class LoginRecord { } else { ip = address.getAddress().getHostAddress(); } - long login_time = player.getLastLogin(); - long logout_time = System.currentTimeMillis(); + Timestamp login_time = new Timestamp(player.getLastLogin()); + Timestamp logout_time = new Timestamp(System.currentTimeMillis()); String logout_location = LocationUtils.Serialize(player.getLocation()); String sql = "INSERT INTO login_record (uuid, ip, login_time, logout_location, logout_time) " + "VALUES (?, ?, ?, ?, ?);";