mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2025-01-04 23:17:35 +01:00
commit
70da194aad
@ -21,8 +21,10 @@ public class ForceFlatToSqlite implements Converter {
|
|||||||
DataSource sqlite = null;
|
DataSource sqlite = null;
|
||||||
try {
|
try {
|
||||||
sqlite = new SQLite();
|
sqlite = new SQLite();
|
||||||
for (PlayerAuth auth : data.getAllAuths())
|
for (PlayerAuth auth : data.getAllAuths()) {
|
||||||
|
auth.setRealName("Player");
|
||||||
sqlite.saveAuth(auth);
|
sqlite.saveAuth(auth);
|
||||||
|
}
|
||||||
plugin.getSettings().setValue("DataSource.backend", "sqlite");
|
plugin.getSettings().setValue("DataSource.backend", "sqlite");
|
||||||
ConsoleLogger.info("Database successfully converted to sqlite !");
|
ConsoleLogger.info("Database successfully converted to sqlite !");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -99,26 +99,28 @@ public class AsyncronousJoin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
final Location spawnLoc = plugin.getSpawnLocation(player);
|
final Location spawnLoc = plugin.getSpawnLocation(player);
|
||||||
if (database.getType() != DataSource.DataSourceType.FILE && database.isAuthAvailable(name)) {
|
if (database.isAuthAvailable(name)) {
|
||||||
PlayerAuth auth = database.getAuth(name);
|
if (database.getType() != DataSource.DataSourceType.FILE) {
|
||||||
if (auth.getRealName() != null && !auth.getRealName().isEmpty() && !auth.getRealName().equalsIgnoreCase("Player") && !auth.getRealName().equals(player.getName())) {
|
PlayerAuth auth = database.getAuth(name);
|
||||||
final GameMode gM = AuthMePlayerListener.gameMode.get(name);
|
if (auth.getRealName() != null && !auth.getRealName().isEmpty() && !auth.getRealName().equalsIgnoreCase("Player") && !auth.getRealName().equals(player.getName())) {
|
||||||
sched.scheduleSyncDelayedTask(plugin, new Runnable() {
|
final GameMode gM = AuthMePlayerListener.gameMode.get(name);
|
||||||
|
sched.scheduleSyncDelayedTask(plugin, new Runnable() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (gM != null) {
|
if (gM != null) {
|
||||||
AuthMePlayerListener.causeByAuthMe.put(name, true);
|
AuthMePlayerListener.causeByAuthMe.put(name, true);
|
||||||
player.setGameMode(gM);
|
player.setGameMode(gM);
|
||||||
AuthMePlayerListener.causeByAuthMe.put(name, false);
|
AuthMePlayerListener.causeByAuthMe.put(name, false);
|
||||||
|
}
|
||||||
|
player.kickPlayer("You are not the Owner of this account, please try another name!");
|
||||||
|
if (Settings.banUnsafeIp)
|
||||||
|
plugin.getServer().banIP(ip);
|
||||||
}
|
}
|
||||||
player.kickPlayer("You are not the Owner of this account, please try another name!");
|
|
||||||
if (Settings.banUnsafeIp)
|
|
||||||
plugin.getServer().banIP(ip);
|
|
||||||
}
|
|
||||||
|
|
||||||
}, 1);
|
}, 1);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (Settings.isForceSurvivalModeEnabled && !Settings.forceOnlyAfterLogin) {
|
if (Settings.isForceSurvivalModeEnabled && !Settings.forceOnlyAfterLogin) {
|
||||||
sched.scheduleSyncDelayedTask(plugin, new Runnable() {
|
sched.scheduleSyncDelayedTask(plugin, new Runnable() {
|
||||||
|
Loading…
Reference in New Issue
Block a user