little fix to lowercase issue

This commit is contained in:
Xephi59 2015-07-31 01:57:40 +02:00
parent e889fb580a
commit 1cc1311323
3 changed files with 3 additions and 3 deletions

View File

@ -162,7 +162,7 @@ public class MySQL implements DataSource {
rs.close();
rs = con.getMetaData().getColumns(null, null, tableName, columnRealName);
if (!rs.next()) {
st.executeUpdate("ALTER TABLE " + tableName + " ADD COLUMN " + columnRealName + " VARCHAR(255) DEFAULT 'Player' AFTER " + columnLogged + ";");
st.executeUpdate("ALTER TABLE " + tableName + " ADD COLUMN " + columnRealName + " VARCHAR(255) NOT NULL DEFAULT 'Player' AFTER " + columnLogged + ";");
}
} finally {
close(rs);

View File

@ -130,7 +130,7 @@ public class SQLite implements DataSource {
rs.close();
rs = con.getMetaData().getColumns(null, null, tableName, columnRealName);
if (!rs.next()) {
st.executeUpdate("ALTER TABLE " + tableName + " ADD COLUMN " + columnRealName + " VARCHAR(255) DEFAULT 'Player';");
st.executeUpdate("ALTER TABLE " + tableName + " ADD COLUMN " + columnRealName + " VARCHAR(255) NOT NULL DEFAULT 'Player';");
}
} finally {
close(rs);

View File

@ -102,7 +102,7 @@ public class AsyncronousJoin {
final Location spawnLoc = plugin.getSpawnLocation(player);
if (database.isAuthAvailable(name)) {
PlayerAuth auth = database.getAuth(name);
if (!auth.getRealName().equals("Player") && !auth.getRealName().equals(player.getName())) {
if (auth.getRealName() != null && !auth.getRealName().equals("Player") && !auth.getRealName().equals(player.getName())) {
final GameMode gM = AuthMePlayerListener.gameMode.get(name);
sched.scheduleSyncDelayedTask(plugin, new Runnable() {