Skip to content

Commit

Permalink
chore(text-minimessage): Fix annotation order
Browse files Browse the repository at this point in the history
  • Loading branch information
kashike committed Dec 18, 2021
1 parent 890b160 commit 67b619b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ final class MiniMessageImpl implements MiniMessage {
}

@Override
public @NotNull String escapeTokens(@NotNull final String input, @NotNull final PlaceholderResolver placeholders) {
public @NotNull String escapeTokens(final @NotNull String input, final @NotNull PlaceholderResolver placeholders) {
return this.parser.escapeTokens(input, this.newContext(input, placeholders));
}

Expand All @@ -91,7 +91,7 @@ final class MiniMessageImpl implements MiniMessage {
}

@Override
public @NotNull String stripTokens(@NotNull final String input, @NotNull final PlaceholderResolver placeholders) {
public @NotNull String stripTokens(final @NotNull String input, final @NotNull PlaceholderResolver placeholders) {
return this.parser.stripTokens(input, this.newContext(input, placeholders));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ private MiniMessageSerializer() {
}

// Sorts a ComponentNode's tree in a LinkedList using Pre Order Traversal.
private static List<ComponentNode> traverseNode(@NotNull final ComponentNode root) {
private static List<ComponentNode> traverseNode(final @NotNull ComponentNode root) {
final List<ComponentNode> nodes = new LinkedList<>();
nodes.add(root);

Expand All @@ -97,7 +97,7 @@ private static List<ComponentNode> traverseNode(@NotNull final ComponentNode roo
}

// Serializes a single node into minimessage format.
private static String serializeNode(@NotNull final ComponentNode node, @Nullable final Style previous, @Nullable final Style next) {
private static String serializeNode(final @NotNull ComponentNode node, final @Nullable Style previous, final @Nullable Style next) {
final StringBuilder sb = new StringBuilder();
final Style style = node.style();

Expand Down Expand Up @@ -340,11 +340,11 @@ private static class ComponentNode {
private final Component component;
private final Style style;

ComponentNode(@NotNull final Component component) {
ComponentNode(final @NotNull Component component) {
this(component, null);
}

ComponentNode(@NotNull final Component component, @Nullable final Style parent) {
ComponentNode(final @NotNull Component component, final @Nullable Style parent) {
this.component = component;
this.style = (parent == null) ? component.style() : component.style().merge(parent, Style.Merge.Strategy.IF_ABSENT_ON_TARGET);
}
Expand Down

0 comments on commit 67b619b

Please sign in to comment.