Actually fix multi names
This commit is contained in:
		| @@ -77,7 +77,7 @@ public abstract class Disguise { | ||||
|     @Getter | ||||
|     private BarStyle bossBarStyle = DisguiseConfig.getBossBarStyle(); | ||||
|     @Getter(value = AccessLevel.PRIVATE) | ||||
|     private transient final NamespacedKey bossBar = new NamespacedKey(LibsDisguises.getInstance(), UUID.randomUUID().toString()); | ||||
|     private 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 == null ? 0 : multiName.length; | ||||
|         return multiName.length; | ||||
|     } | ||||
|  | ||||
|     @RandomDefaultValue | ||||
| @@ -1090,6 +1090,11 @@ public abstract class Disguise { | ||||
|             throw new IllegalStateException("No entity is assigned to this disguise!"); | ||||
|         } | ||||
|  | ||||
|         // Fix for old LD updates to new LD where gson hates missing fields | ||||
|         if (multiName == null) { | ||||
|             multiName = new String[0]; | ||||
|         } | ||||
|  | ||||
|         if (LibsPremium.getUserID().equals("123" + "45") || !LibsMsg.OWNED_BY.getRaw().contains("'")) { | ||||
|             ((TargetedDisguise) this).setDisguiseTarget(TargetType.HIDE_DISGUISE_TO_EVERYONE_BUT_THESE_PLAYERS); | ||||
|  | ||||
|   | ||||
| @@ -1788,6 +1788,10 @@ public class DisguiseUtilities { | ||||
|     } | ||||
|  | ||||
|     public static String[] reverse(String[] array) { | ||||
|         if (array == null) { | ||||
|             return new String[0]; | ||||
|         } | ||||
|  | ||||
|         String[] newArray = new String[array.length]; | ||||
|  | ||||
|         for (int i = 1; i <= array.length; i++) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user