Make getCustomData() return HashMap to retain compatibility

This commit is contained in:
libraryaddict 2021-06-03 17:31:16 +12:00
parent 20a017e686
commit bde28a6521
2 changed files with 5 additions and 2 deletions

View File

@ -75,7 +75,6 @@ public abstract class Disguise {
/**
* For when plugins may want to assign custom data to a disguise, such as who owns it
*/
@Getter
private final LinkedHashMap<String, Object> customData = new LinkedHashMap<>();
@Getter
private String disguiseName;
@ -103,6 +102,10 @@ public abstract class Disguise {
this.disguiseName = disguiseType.toReadable();
}
public HashMap<String, Object> getCustomData() {
return customData;
}
public UUID getUUID() {
// Partial fix for disguises serialized in older versions
if (this.uuid == null) {

View File

@ -250,7 +250,7 @@ public class DisguiseParser {
}
if (includeCustomData) {
LinkedHashMap<String, Object> meta = disguise.getCustomData();
HashMap<String, Object> meta = disguise.getCustomData();
LinkedHashMap<String, String> serializedMeta = new LinkedHashMap<>();
for (Entry<String, Object> entry : meta.entrySet()) {