diff --git a/src/main/java/fr/xephi/authme/api/API.java b/src/main/java/fr/xephi/authme/api/API.java index a5e8d190e..477494a20 100644 --- a/src/main/java/fr/xephi/authme/api/API.java +++ b/src/main/java/fr/xephi/authme/api/API.java @@ -21,6 +21,7 @@ public class API { public static final String newline = System.getProperty("line.separator"); public static AuthMe instance; + @Deprecated public API(AuthMe instance) { API.instance = instance; } diff --git a/src/main/java/fr/xephi/authme/datasource/FlatFile.java b/src/main/java/fr/xephi/authme/datasource/FlatFile.java index 198b1cd54..2b54e4df9 100644 --- a/src/main/java/fr/xephi/authme/datasource/FlatFile.java +++ b/src/main/java/fr/xephi/authme/datasource/FlatFile.java @@ -714,16 +714,22 @@ public class FlatFile implements DataSource { switch (args.length) { case 2: auths.add(new PlayerAuth(args[0], args[1], "192.168.0.1", 0, "your@email.com", args[0])); + break; case 3: auths.add(new PlayerAuth(args[0], args[1], args[2], 0, "your@email.com", args[0])); + break; case 4: auths.add(new PlayerAuth(args[0], args[1], args[2], Long.parseLong(args[3]), "your@email.com", args[0])); + break; case 7: auths.add(new PlayerAuth(args[0], args[1], args[2], Long.parseLong(args[3]), Double.parseDouble(args[4]), Double.parseDouble(args[5]), Double.parseDouble(args[6]), "unavailableworld", "your@email.com", args[0])); + break; case 8: auths.add(new PlayerAuth(args[0], args[1], args[2], Long.parseLong(args[3]), Double.parseDouble(args[4]), Double.parseDouble(args[5]), Double.parseDouble(args[6]), args[7], "your@email.com", args[0])); + break; case 9: auths.add(new PlayerAuth(args[0], args[1], args[2], Long.parseLong(args[3]), Double.parseDouble(args[4]), Double.parseDouble(args[5]), Double.parseDouble(args[6]), args[7], args[8], args[0])); + break; } } } catch (FileNotFoundException ex) { diff --git a/src/main/java/fr/xephi/authme/process/join/AsyncronousJoin.java b/src/main/java/fr/xephi/authme/process/join/AsyncronousJoin.java index 9aa303116..163b4f47a 100644 --- a/src/main/java/fr/xephi/authme/process/join/AsyncronousJoin.java +++ b/src/main/java/fr/xephi/authme/process/join/AsyncronousJoin.java @@ -99,9 +99,9 @@ public class AsyncronousJoin { } } final Location spawnLoc = plugin.getSpawnLocation(player); - if (database.isAuthAvailable(name)) { + if (database.getType() != DataSource.DataSourceType.FILE && database.isAuthAvailable(name)) { PlayerAuth auth = database.getAuth(name); - if (auth.getRealName() != null && !auth.getRealName().equals("Player") && !auth.getRealName().equals(player.getName())) { + if (auth.getRealName() != null && !auth.getRealName().isEmpty() && !auth.getRealName().equalsIgnoreCase("Player") && !auth.getRealName().equals(player.getName())) { final GameMode gM = AuthMePlayerListener.gameMode.get(name); sched.scheduleSyncDelayedTask(plugin, new Runnable() {