From 67b619b9ba5609e86dd065e6e7277557da2e687b Mon Sep 17 00:00:00 2001 From: Riley Park Date: Sat, 18 Dec 2021 14:16:09 -0800 Subject: [PATCH] chore(text-minimessage): Fix annotation order --- .../kyori/adventure/text/minimessage/MiniMessageImpl.java | 4 ++-- .../adventure/text/minimessage/MiniMessageSerializer.java | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/text-minimessage/src/main/java/net/kyori/adventure/text/minimessage/MiniMessageImpl.java b/text-minimessage/src/main/java/net/kyori/adventure/text/minimessage/MiniMessageImpl.java index 70a437876..59556a349 100644 --- a/text-minimessage/src/main/java/net/kyori/adventure/text/minimessage/MiniMessageImpl.java +++ b/text-minimessage/src/main/java/net/kyori/adventure/text/minimessage/MiniMessageImpl.java @@ -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)); } @@ -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)); } diff --git a/text-minimessage/src/main/java/net/kyori/adventure/text/minimessage/MiniMessageSerializer.java b/text-minimessage/src/main/java/net/kyori/adventure/text/minimessage/MiniMessageSerializer.java index e40078041..29b6bbe5d 100644 --- a/text-minimessage/src/main/java/net/kyori/adventure/text/minimessage/MiniMessageSerializer.java +++ b/text-minimessage/src/main/java/net/kyori/adventure/text/minimessage/MiniMessageSerializer.java @@ -82,7 +82,7 @@ private MiniMessageSerializer() { } // Sorts a ComponentNode's tree in a LinkedList using Pre Order Traversal. - private static List traverseNode(@NotNull final ComponentNode root) { + private static List traverseNode(final @NotNull ComponentNode root) { final List nodes = new LinkedList<>(); nodes.add(root); @@ -97,7 +97,7 @@ private static List 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(); @@ -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); }