Make getCustomData() return HashMap to retain compatibility
This commit is contained in:
parent
20a017e686
commit
bde28a6521
@ -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
|
* 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<>();
|
private final LinkedHashMap<String, Object> customData = new LinkedHashMap<>();
|
||||||
@Getter
|
@Getter
|
||||||
private String disguiseName;
|
private String disguiseName;
|
||||||
@ -103,6 +102,10 @@ public abstract class Disguise {
|
|||||||
this.disguiseName = disguiseType.toReadable();
|
this.disguiseName = disguiseType.toReadable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public HashMap<String, Object> getCustomData() {
|
||||||
|
return customData;
|
||||||
|
}
|
||||||
|
|
||||||
public UUID getUUID() {
|
public UUID getUUID() {
|
||||||
// Partial fix for disguises serialized in older versions
|
// Partial fix for disguises serialized in older versions
|
||||||
if (this.uuid == null) {
|
if (this.uuid == null) {
|
||||||
|
@ -250,7 +250,7 @@ public class DisguiseParser {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (includeCustomData) {
|
if (includeCustomData) {
|
||||||
LinkedHashMap<String, Object> meta = disguise.getCustomData();
|
HashMap<String, Object> meta = disguise.getCustomData();
|
||||||
LinkedHashMap<String, String> serializedMeta = new LinkedHashMap<>();
|
LinkedHashMap<String, String> serializedMeta = new LinkedHashMap<>();
|
||||||
|
|
||||||
for (Entry<String, Object> entry : meta.entrySet()) {
|
for (Entry<String, Object> entry : meta.entrySet()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user