Skip to content

Commit

Permalink
recognize yaml config as a map in object convert
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Dec 15, 2020
1 parent b261117 commit 701656c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,6 @@ public long getLongContext(int attribute) {
Debug.echoError("Tag <" + toString() + "> has invalid input - expected a number, got '" + getContext(attribute) + "'...: " + ex.getMessage());
}
}

return 0;
}

Expand All @@ -379,7 +378,6 @@ public int getIntContext(int attribute) {
Debug.echoError("Tag <" + toString() + "> has invalid input - expected a number, got '" + getContext(attribute) + "'...: " + ex.getMessage());
}
}

return 0;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ public static ObjectTag objectToTagForm(Object obj, TagContext context, boolean
if (obj == null) {
return new ElementTag("null");
}
else if (obj instanceof List) {
if (obj instanceof YamlConfiguration) {
obj = ((YamlConfiguration) obj).contents;
}
if (obj instanceof List) {
ListTag listResult = new ListTag();
for (Object subObj : (List) obj) {
listResult.addObject(objectToTagForm(subObj, context, scriptStrip, doParse));
Expand Down

0 comments on commit 701656c

Please sign in to comment.