diff --git a/src/main/java/me/libraryaddict/disguise/utilities/json/SerializerFlagWatcher.java b/src/main/java/me/libraryaddict/disguise/utilities/json/SerializerFlagWatcher.java index e437faaf..5f232b12 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/json/SerializerFlagWatcher.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/json/SerializerFlagWatcher.java @@ -6,6 +6,7 @@ import com.google.gson.internal.LinkedTreeMap; import me.libraryaddict.disguise.disguisetypes.*; import me.libraryaddict.disguise.utilities.DisguiseUtilities; import me.libraryaddict.disguise.utilities.params.ParamInfoManager; +import me.libraryaddict.disguise.utilities.params.types.ParamInfoEnum; import me.libraryaddict.disguise.utilities.params.types.custom.ParamInfoParticle; import me.libraryaddict.disguise.utilities.parser.DisguiseParseException; import org.bukkit.inventory.ItemStack; @@ -73,6 +74,8 @@ public class SerializerFlagWatcher implements JsonDeserializer, Jso } else if (entry.getValue() instanceof String) { if (index.getDefault() instanceof WrappedParticle) { entry.setValue(((ParamInfoParticle) ParamInfoManager.getParamInfo(WrappedParticle.class)).fromString((String) entry.getValue())); + } else if (index.getDefault() instanceof EntityPose) { + entry.setValue(((ParamInfoEnum) ParamInfoManager.getParamInfo(EntityPose.class)).fromString((String) entry.getValue())); } } else if (entry.getValue() instanceof LinkedTreeMap) { // If it's deserialized incorrectly as a map // If the default value is not VillagerData diff --git a/src/main/java/me/libraryaddict/disguise/utilities/params/types/ParamInfoEnum.java b/src/main/java/me/libraryaddict/disguise/utilities/params/types/ParamInfoEnum.java index b332cf34..032e25b2 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/params/types/ParamInfoEnum.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/params/types/ParamInfoEnum.java @@ -26,7 +26,7 @@ public class ParamInfoEnum extends ParamInfo { } @Override - protected Object fromString(String string) throws DisguiseParseException { + public Object fromString(String string) throws DisguiseParseException { string = string.replace("_", ""); for (Map.Entry entry : getValues().entrySet()) {