Attempt to serialize metadata with a saved disguise. Use linked hash map instead of HashMap
This commit is contained in:
		| @@ -76,7 +76,7 @@ public abstract class Disguise { | ||||
|      * For when plugins may want to assign custom data to a disguise, such as who owns it | ||||
|      */ | ||||
|     @Getter | ||||
|     private final HashMap<String, Object> customData = new HashMap<>(); | ||||
|     private final LinkedHashMap<String, Object> customData = new LinkedHashMap<>(); | ||||
|     @Getter | ||||
|     private String disguiseName; | ||||
|     /** | ||||
|   | ||||
| @@ -632,7 +632,7 @@ public class DisguiseUtilities { | ||||
|                 PrintWriter writer = new PrintWriter(disguiseFile, "12345".equals("%%__USER__%%") ? "US-ASCII" : "UTF-8"); | ||||
|  | ||||
|                 for (int i = 0; i < disguise.length; i++) { | ||||
|                     writer.write(DisguiseParser.parseToString(disguise[i])); | ||||
|                     writer.write(DisguiseParser.parseToString(disguise[i], true, true)); | ||||
|  | ||||
|                     if (i + 1 < disguise.length) { | ||||
|                         writer.write("\n"); | ||||
|   | ||||
| @@ -182,7 +182,7 @@ public class DisguiseMethods { | ||||
|      * @param className The class name, never `null` | ||||
|      * @throws IllegalArgumentException if no class can be loaded | ||||
|      */ | ||||
|     private Class<?> parseType(final String className) throws ClassNotFoundException { | ||||
|     public static Class<?> parseType(final String className) throws ClassNotFoundException { | ||||
|         if (className == null) { | ||||
|             return null; | ||||
|         } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user