Skip to content

Commit

Permalink
Alias effect to potion in XML
Browse files Browse the repository at this point in the history
Signed-off-by: TheMolkaPL <themolkapl@gmail.com>
  • Loading branch information
TheMolkaPL authored and Electroid committed Nov 13, 2019
1 parent e5b75aa commit bf8945b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/tc/oc/pgm/kits/KitParser.java
Expand Up @@ -267,15 +267,15 @@ public PotionKit parsePotionKit(Element el) throws InvalidXMLException {
public List<PotionEffect> parsePotions(Element el) throws InvalidXMLException {
List<PotionEffect> effects = new ArrayList<>();

Node attr = Node.fromAttr(el, "potion", "potions");
Node attr = Node.fromAttr(el, "potion", "potions", "effect", "effects");
if (attr != null) {
for (String piece : attr.getValue().split(";")) {
effects.add(XMLUtils.parseCompactPotionEffect(attr, piece));
}
}

for (Element elPotion : el.getChildren("potion")) {
effects.add(XMLUtils.parsePotionEffect(elPotion));
for (Node elPotion : Node.fromChildren(el, "potion", "effect")) {
effects.add(XMLUtils.parsePotionEffect(elPotion.getElement()));
}

return effects;
Expand Down

0 comments on commit bf8945b

Please sign in to comment.