Merge pull request #23 from Xephi/master

Up
This commit is contained in:
Gabriele C. 2015-08-02 01:32:47 +02:00
commit e4183a389c
3 changed files with 9 additions and 2 deletions

View File

@ -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;
}

View File

@ -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) {

View File

@ -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() {