mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
These should all be 0 too, for consistancy
This commit is contained in:
parent
d6b39a11e7
commit
36b09421e8
@ -105,10 +105,10 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
|||||||
public void saveUser(PlayerProfile profile) {
|
public void saveUser(PlayerProfile profile) {
|
||||||
checkConnected();
|
checkConnected();
|
||||||
int userId = readId(profile.getPlayerName());
|
int userId = readId(profile.getPlayerName());
|
||||||
if (userId == -1) {
|
if (userId == 0) {
|
||||||
newUser(profile.getPlayerName());
|
newUser(profile.getPlayerName());
|
||||||
userId = readId(profile.getPlayerName());
|
userId = readId(profile.getPlayerName());
|
||||||
if (userId == -1) {
|
if (userId == 0) {
|
||||||
mcMMO.p.getLogger().log(Level.WARNING, "Failed to save user " + profile.getPlayerName());
|
mcMMO.p.getLogger().log(Level.WARNING, "Failed to save user " + profile.getPlayerName());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1043,7 +1043,7 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private int readId(String playerName) {
|
private int readId(String playerName) {
|
||||||
int id = -1;
|
int id = 0;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
PreparedStatement statement = connection.prepareStatement("SELECT id FROM " + tablePrefix + "users WHERE user = ?");
|
PreparedStatement statement = connection.prepareStatement("SELECT id FROM " + tablePrefix + "users WHERE user = ?");
|
||||||
|
Loading…
Reference in New Issue
Block a user