Fix error for multiname length, don't refuse old bossbars
This commit is contained in:
		| @@ -77,7 +77,7 @@ public abstract class Disguise { | ||||
|     @Getter | ||||
|     private BarStyle bossBarStyle = DisguiseConfig.getBossBarStyle(); | ||||
|     @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; | ||||
|     /** | ||||
|      * If set, how long before disguise expires | ||||
| @@ -114,7 +114,7 @@ public abstract class Disguise { | ||||
|     } | ||||
|  | ||||
|     public int getMultiNameLength() { | ||||
|         return multiName.length; | ||||
|         return multiName == null ? 0 : multiName.length; | ||||
|     } | ||||
|  | ||||
|     @RandomDefaultValue | ||||
|   | ||||
| @@ -704,16 +704,18 @@ public class DisguiseUtilities { | ||||
|     } | ||||
|  | ||||
|     public static WrappedGameProfile getGameProfile(String playerName) { | ||||
|         playerName = playerName.toLowerCase(); | ||||
|  | ||||
|         if (!hasGameProfile(playerName)) | ||||
|             return null; | ||||
|  | ||||
|         if (!profileCache.exists()) | ||||
|             profileCache.mkdirs(); | ||||
|  | ||||
|         File file = new File(profileCache, playerName.toLowerCase()); | ||||
|         File file = new File(profileCache, playerName); | ||||
|  | ||||
|         if (!file.exists()) { | ||||
|             cachedNames.remove(playerName.toLowerCase()); | ||||
|             cachedNames.remove(playerName); | ||||
|             return null; | ||||
|         } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user