mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-12-14 15:26:54 +01:00
Fixed gameprofile cache settings
This commit is contained in:
parent
2c3c8af932
commit
9002c540ce
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user