mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-12-23 17:17:36 +01:00
Attempt to fix dubious isUuidInstance in vAuthFileReader
This commit is contained in:
parent
579b7e7b97
commit
7f049616c6
@ -47,7 +47,7 @@ public class vAuthFileReader {
|
|||||||
String name = line.split(": ")[0];
|
String name = line.split(": ")[0];
|
||||||
String password = line.split(": ")[1];
|
String password = line.split(": ")[1];
|
||||||
PlayerAuth auth;
|
PlayerAuth auth;
|
||||||
if (isUUIDinstance(password)) {
|
if (isUuidInstance(password)) {
|
||||||
String pname;
|
String pname;
|
||||||
try {
|
try {
|
||||||
pname = Bukkit.getOfflinePlayer(UUID.fromString(name)).getName();
|
pname = Bukkit.getOfflinePlayer(UUID.fromString(name)).getName();
|
||||||
@ -68,15 +68,8 @@ public class vAuthFileReader {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
private static boolean isUuidInstance(String s) {
|
||||||
* Method isUUIDinstance.
|
return s.length() > 8 && s.charAt(8) == '-';
|
||||||
* @param s String
|
|
||||||
|
|
||||||
* @return boolean */
|
|
||||||
private boolean isUUIDinstance(String s) {
|
|
||||||
if (String.valueOf(s.charAt(8)).equalsIgnoreCase("-"))
|
|
||||||
return true;
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user