This commit is contained in:
parent
af7223c27f
commit
cb9716e7b0
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>cn.lunadeer</groupId>
|
<groupId>cn.lunadeer</groupId>
|
||||||
<artifactId>EssentialsD</artifactId>
|
<artifactId>EssentialsD</artifactId>
|
||||||
<version>1.22.0</version>
|
<version>1.22.1</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>EssentialsD</name>
|
<name>EssentialsD</name>
|
||||||
|
@ -6,6 +6,7 @@ import org.bukkit.entity.Player;
|
|||||||
|
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.Timestamp;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
public class LoginRecord {
|
public class LoginRecord {
|
||||||
@ -32,8 +33,8 @@ public class LoginRecord {
|
|||||||
} else {
|
} else {
|
||||||
ip = address.getAddress().getHostAddress();
|
ip = address.getAddress().getHostAddress();
|
||||||
}
|
}
|
||||||
long login_time = player.getLastLogin();
|
Timestamp login_time = new Timestamp(player.getLastLogin());
|
||||||
long logout_time = System.currentTimeMillis();
|
Timestamp logout_time = new Timestamp(System.currentTimeMillis());
|
||||||
String logout_location = LocationUtils.Serialize(player.getLocation());
|
String logout_location = LocationUtils.Serialize(player.getLocation());
|
||||||
String sql = "INSERT INTO login_record (uuid, ip, login_time, logout_location, logout_time) " +
|
String sql = "INSERT INTO login_record (uuid, ip, login_time, logout_location, logout_time) " +
|
||||||
"VALUES (?, ?, ?, ?, ?);";
|
"VALUES (?, ?, ?, ?, ?);";
|
||||||
|
Loading…
Reference in New Issue
Block a user