1
0
mirror of https://github.com/AuthMe/AuthMeReloaded.git synced 2025-03-28 22:35:58 +01:00

Merge branch 'ljacqu-pruuid_bug'

This commit is contained in:
Xephi 2015-11-30 19:13:12 +01:00
commit a262b26451

View File

@ -42,8 +42,8 @@ public class vAuthFileReader {
String name = line.split(": ")[0];
String password = line.split(": ")[1];
PlayerAuth auth;
if (isUUIDinstance(password)) {
String playerName;
if (isUuidInstance(password)) {
String pname;
try {
playerName = Bukkit.getOfflinePlayer(UUID.fromString(name)).getName();
} catch (Exception | NoSuchMethodError e) {
@ -64,17 +64,8 @@ public class vAuthFileReader {
}
/**
* Method isUUIDinstance.
*
* @param s String
*
* @return boolean
*/
private boolean isUUIDinstance(String s) {
if (String.valueOf(s.charAt(8)).equalsIgnoreCase("-"))
return true;
return true;
private static boolean isUuidInstance(String s) {
return s.length() > 8 && s.charAt(8) == '-';
}
/**