mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-02 08:39:49 +01:00
Synchronizing watches...
This commit is contained in:
parent
0fcf033ecc
commit
7f8beca33c
@ -184,7 +184,7 @@ public class PlayerProfile {
|
|||||||
Database database = mcMMO.getPlayerDatabase();
|
Database database = mcMMO.getPlayerDatabase();
|
||||||
String tablePrefix = Config.getInstance().getMySQLTablePrefix();
|
String tablePrefix = Config.getInstance().getMySQLTablePrefix();
|
||||||
|
|
||||||
database.write("INSERT INTO " + tablePrefix + "users (user, lastlogin) VALUES ('" + playerName + "'," + System.currentTimeMillis() / 1000 + ")");
|
database.write("INSERT INTO " + tablePrefix + "users (user, lastlogin) VALUES ('" + playerName + "'," + System.currentTimeMillis() / Misc.TIME_CONVERSION_FACTOR + ")");
|
||||||
userId = database.getInt("SELECT id FROM "+tablePrefix + "users WHERE user = '" + playerName + "'");
|
userId = database.getInt("SELECT id FROM "+tablePrefix + "users WHERE user = '" + playerName + "'");
|
||||||
database.write("INSERT INTO " + tablePrefix + "cooldowns (user_id) VALUES (" + userId + ")");
|
database.write("INSERT INTO " + tablePrefix + "cooldowns (user_id) VALUES (" + userId + ")");
|
||||||
database.write("INSERT INTO " + tablePrefix + "skills (user_id) VALUES (" + userId + ")");
|
database.write("INSERT INTO " + tablePrefix + "skills (user_id) VALUES (" + userId + ")");
|
||||||
@ -306,7 +306,7 @@ public class PlayerProfile {
|
|||||||
String tablePrefix = Config.getInstance().getMySQLTablePrefix();
|
String tablePrefix = Config.getInstance().getMySQLTablePrefix();
|
||||||
|
|
||||||
database.write("UPDATE " + tablePrefix + "huds SET hudtype = '" + hudType.toString() + "' WHERE user_id = " + userId);
|
database.write("UPDATE " + tablePrefix + "huds SET hudtype = '" + hudType.toString() + "' WHERE user_id = " + userId);
|
||||||
database.write("UPDATE " + tablePrefix + "users SET lastlogin = " + ((int) (timestamp / 1000L)) + " WHERE id = " + userId);
|
database.write("UPDATE " + tablePrefix + "users SET lastlogin = " + ((int) (timestamp / Misc.TIME_CONVERSION_FACTOR)) + " WHERE id = " + userId);
|
||||||
database.write("UPDATE " + tablePrefix + "cooldowns SET "
|
database.write("UPDATE " + tablePrefix + "cooldowns SET "
|
||||||
+ " mining = " + skillsDATS.get(AbilityType.SUPER_BREAKER)
|
+ " mining = " + skillsDATS.get(AbilityType.SUPER_BREAKER)
|
||||||
+ ", woodcutting = " + skillsDATS.get(AbilityType.TREE_FELLER)
|
+ ", woodcutting = " + skillsDATS.get(AbilityType.TREE_FELLER)
|
||||||
@ -658,7 +658,7 @@ public class PlayerProfile {
|
|||||||
* @param ATS the ATS of the tool
|
* @param ATS the ATS of the tool
|
||||||
*/
|
*/
|
||||||
public void setToolPreparationATS(ToolType tool, long ATS) {
|
public void setToolPreparationATS(ToolType tool, long ATS) {
|
||||||
int startTime = (int) (ATS / 1000);
|
int startTime = (int) (ATS / Misc.TIME_CONVERSION_FACTOR);
|
||||||
toolATS.put(tool, startTime);
|
toolATS.put(tool, startTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -853,7 +853,7 @@ public class PlayerProfile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void actualizeRecentlyHurt() {
|
public void actualizeRecentlyHurt() {
|
||||||
respawnATS = (int) (System.currentTimeMillis() / 1000);
|
respawnATS = (int) (System.currentTimeMillis() / Misc.TIME_CONVERSION_FACTOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -899,7 +899,7 @@ public class PlayerProfile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void actualizeRespawnATS() {
|
public void actualizeRespawnATS() {
|
||||||
respawnATS = (int) (System.currentTimeMillis() / 1000);
|
respawnATS = (int) (System.currentTimeMillis() / Misc.TIME_CONVERSION_FACTOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -219,7 +219,7 @@ public class SQLConversionTask implements Runnable {
|
|||||||
+ tablePrefix
|
+ tablePrefix
|
||||||
+ "users (user, lastlogin) VALUES ('"
|
+ "users (user, lastlogin) VALUES ('"
|
||||||
+ playerName + "',"
|
+ playerName + "',"
|
||||||
+ System.currentTimeMillis() / 1000 + ")");
|
+ System.currentTimeMillis() / Misc.TIME_CONVERSION_FACTOR + ")");
|
||||||
id = database.getInt("SELECT id FROM "
|
id = database.getInt("SELECT id FROM "
|
||||||
+ tablePrefix
|
+ tablePrefix
|
||||||
+ "users WHERE user = '"
|
+ "users WHERE user = '"
|
||||||
|
Loading…
Reference in New Issue
Block a user