Fix error for multiname length, don't refuse old bossbars
This commit is contained in:
parent
e317f676b3
commit
3ebf9cce65
@ -77,7 +77,7 @@ public abstract class Disguise {
|
|||||||
@Getter
|
@Getter
|
||||||
private BarStyle bossBarStyle = DisguiseConfig.getBossBarStyle();
|
private BarStyle bossBarStyle = DisguiseConfig.getBossBarStyle();
|
||||||
@Getter(value = AccessLevel.PRIVATE)
|
@Getter(value = AccessLevel.PRIVATE)
|
||||||
private final NamespacedKey bossBar = new NamespacedKey(LibsDisguises.getInstance(), UUID.randomUUID().toString());
|
private transient final NamespacedKey bossBar = new NamespacedKey(LibsDisguises.getInstance(), UUID.randomUUID().toString());
|
||||||
private FlagWatcher watcher;
|
private FlagWatcher watcher;
|
||||||
/**
|
/**
|
||||||
* If set, how long before disguise expires
|
* If set, how long before disguise expires
|
||||||
@ -114,7 +114,7 @@ public abstract class Disguise {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getMultiNameLength() {
|
public int getMultiNameLength() {
|
||||||
return multiName.length;
|
return multiName == null ? 0 : multiName.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
@RandomDefaultValue
|
@RandomDefaultValue
|
||||||
|
@ -704,16 +704,18 @@ public class DisguiseUtilities {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static WrappedGameProfile getGameProfile(String playerName) {
|
public static WrappedGameProfile getGameProfile(String playerName) {
|
||||||
|
playerName = playerName.toLowerCase();
|
||||||
|
|
||||||
if (!hasGameProfile(playerName))
|
if (!hasGameProfile(playerName))
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
if (!profileCache.exists())
|
if (!profileCache.exists())
|
||||||
profileCache.mkdirs();
|
profileCache.mkdirs();
|
||||||
|
|
||||||
File file = new File(profileCache, playerName.toLowerCase());
|
File file = new File(profileCache, playerName);
|
||||||
|
|
||||||
if (!file.exists()) {
|
if (!file.exists()) {
|
||||||
cachedNames.remove(playerName.toLowerCase());
|
cachedNames.remove(playerName);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user