This commit is contained in:
Rsl1122 2017-07-09 14:25:36 +03:00
parent 4a78790638
commit c72440d689
3 changed files with 6 additions and 12 deletions

View File

@ -32,7 +32,11 @@ public class FakeOfflinePlayer implements OfflinePlayer {
@Override
public String getName() {
return data.getName();
String name = data.getName();
if (name == null) {
name = "null";
}
return name;
}
@Override

View File

@ -93,17 +93,7 @@ public class ProtocolTable extends Table {
}
private boolean exists(UUID uuid) throws SQLException {
PreparedStatement statement = null;
ResultSet set = null;
try {
statement = prepareStatement("SELECT " + columnUUID + " FROM " + tableName + " WHERE " + columnUUID + "=?");
statement.setString(1, uuid.toString());
set = statement.executeQuery();
return set.next();
} finally {
close(set);
close(statement);
}
return getProtocolVersion(uuid) != -1;
}
private void updateProtocolVersion(UUID uuid, int version) throws SQLException {