Skip to content

Commit

Permalink
copy children over too
Browse files Browse the repository at this point in the history
  • Loading branch information
kezz committed Sep 19, 2023
1 parent a96ca2b commit 9b668ad
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,18 @@ public MiniMessageTranslator(final @NotNull MiniMessage miniMessage) {
return null;
}

final Component resultingComponent;

if (component.args().isEmpty()) {
return MiniMessage.miniMessage().deserialize(miniMessageString);
resultingComponent = MiniMessage.miniMessage().deserialize(miniMessageString);
} else {
resultingComponent = MiniMessage.miniMessage().deserialize(miniMessageString, new ArgumentTag(component.args()));
}

if (component.children().isEmpty()) {
return resultingComponent;
} else {
return MiniMessage.miniMessage().deserialize(miniMessageString, new ArgumentTag(component.args()));
return resultingComponent.children(component.children());
}
}
}

0 comments on commit 9b668ad

Please sign in to comment.