Fixed gameprofile cache settings

This commit is contained in:
libraryaddict 2017-07-11 02:38:28 +12:00
parent 2c3c8af932
commit 9002c540ce

View File

@ -588,7 +588,7 @@ public class DisguiseUtilities {
} }
public static WrappedGameProfile getGameProfile(String playerName) { public static WrappedGameProfile getGameProfile(String playerName) {
if (!cachedNames.contains(playerName.toLowerCase())) if (!hasGameProfile(playerName))
return null; return null;
if (!profileCache.exists()) if (!profileCache.exists())
@ -726,7 +726,7 @@ public class DisguiseUtilities {
boolean contactMojang) { boolean contactMojang) {
final String playerName = origName.toLowerCase(); final String playerName = origName.toLowerCase();
if (cachedNames.contains(playerName)) { if (DisguiseConfig.isSaveGameProfiles() && hasGameProfile(playerName)) {
return getGameProfile(playerName); return getGameProfile(playerName);
} else if (Pattern.matches("([A-Za-z0-9_]){1,16}", origName)) { } else if (Pattern.matches("([A-Za-z0-9_]){1,16}", origName)) {
final Player player = Bukkit.getPlayerExact(playerName); final Player player = Bukkit.getPlayerExact(playerName);
@ -894,8 +894,6 @@ public class DisguiseUtilities {
for (String key : savedDisguises.list()) { for (String key : savedDisguises.list()) {
savedDisguiseList.add(UUID.fromString(key)); savedDisguiseList.add(UUID.fromString(key));
} }
LibsPremium.check(libsDisguises);
} }
public static boolean isDisguiseInUse(Disguise disguise) { public static boolean isDisguiseInUse(Disguise disguise) {