diff --git a/chat/src/main/java/net/md_5/bungee/api/chat/ComponentBuilder.java b/chat/src/main/java/net/md_5/bungee/api/chat/ComponentBuilder.java index 08325a01..2b02a49d 100644 --- a/chat/src/main/java/net/md_5/bungee/api/chat/ComponentBuilder.java +++ b/chat/src/main/java/net/md_5/bungee/api/chat/ComponentBuilder.java @@ -455,8 +455,8 @@ public final class ComponentBuilder } /** - * Returns the component built by this builder. If this builder is - * empty, an empty text component will be returned. + * Returns the component built by this builder. If this builder is empty, an + * empty text component will be returned. * * @return the component */ @@ -478,8 +478,8 @@ public final class ComponentBuilder *
* NOTE: {@link #build()} is preferred as it will
* consolidate all components into a single BaseComponent with extra
- * contents as opposed to an array of components which is non-standard
- * and may result in unexpected behavior.
+ * contents as opposed to an array of components which is non-standard and
+ * may result in unexpected behavior.
*
* @return the created components
*/
diff --git a/chat/src/main/java/net/md_5/bungee/api/chat/ItemTag.java b/chat/src/main/java/net/md_5/bungee/api/chat/ItemTag.java
index c95b70fe..75b2776c 100644
--- a/chat/src/main/java/net/md_5/bungee/api/chat/ItemTag.java
+++ b/chat/src/main/java/net/md_5/bungee/api/chat/ItemTag.java
@@ -43,7 +43,7 @@ public final class ItemTag
private final int level;
private final int id;
}
- */
+ */
private ItemTag(String nbt)
{
diff --git a/chat/src/main/java/net/md_5/bungee/api/chat/hover/content/Text.java b/chat/src/main/java/net/md_5/bungee/api/chat/hover/content/Text.java
index 214558f7..b0576dbb 100644
--- a/chat/src/main/java/net/md_5/bungee/api/chat/hover/content/Text.java
+++ b/chat/src/main/java/net/md_5/bungee/api/chat/hover/content/Text.java
@@ -26,7 +26,10 @@ public class Text extends Content
public Text(BaseComponent value)
{
// For legacy serialization reasons, this has to be an array of components
- this( new BaseComponent[]{value} );
+ this( new BaseComponent[]
+ {
+ value
+ } );
}
public Text(String value)
diff --git a/chat/src/main/java/net/md_5/bungee/chat/ComponentSerializer.java b/chat/src/main/java/net/md_5/bungee/chat/ComponentSerializer.java
index 8b2dac9f..82a18120 100644
--- a/chat/src/main/java/net/md_5/bungee/chat/ComponentSerializer.java
+++ b/chat/src/main/java/net/md_5/bungee/chat/ComponentSerializer.java
@@ -44,16 +44,17 @@ public class ComponentSerializer implements JsonDeserializer
- * NOTE: {@link #deserialize(String)} is preferred as it will
- * parse only one component as opposed to an array of components which is non-
- * standard behavior. This method is still appropriate for parsing multiple
- * components at once, although such use case is rarely (if at all) exhibited
- * in vanilla Minecraft.
+ * NOTE: {@link #deserialize(String)} is preferred as it
+ * will parse only one component as opposed to an array of components which
+ * is non- standard behavior. This method is still appropriate for parsing
+ * multiple components at once, although such use case is rarely (if at all)
+ * exhibited in vanilla Minecraft.
*
* @param json the component json to parse
* @return an array of all parsed components
diff --git a/chat/src/test/java/net/md_5/bungee/api/chat/ComponentsTest.java b/chat/src/test/java/net/md_5/bungee/api/chat/ComponentsTest.java
index 1273e098..4dba2546 100644
--- a/chat/src/test/java/net/md_5/bungee/api/chat/ComponentsTest.java
+++ b/chat/src/test/java/net/md_5/bungee/api/chat/ComponentsTest.java
@@ -561,8 +561,7 @@ public class ComponentsTest
this.testBuilder(
ComponentBuilder::create,
BaseComponent::toPlainText,
- ChatColor.RED + "Hello " + ChatColor.BLUE + ChatColor.BOLD
- + "World" + ChatColor.YELLOW + ChatColor.BOLD + "!",
+ ChatColor.RED + "Hello " + ChatColor.BLUE + ChatColor.BOLD + "World" + ChatColor.YELLOW + ChatColor.BOLD + "!",
BaseComponent::toLegacyText
);
}
@@ -574,8 +573,7 @@ public class ComponentsTest
ComponentBuilder::build,
(component) -> BaseComponent.toPlainText( component ),
// An extra format code is appended to the beginning because there is an empty TextComponent at the start of every component
- ChatColor.WHITE.toString() + ChatColor.RED + "Hello " + ChatColor.BLUE + ChatColor.BOLD
- + "World" + ChatColor.YELLOW + ChatColor.BOLD + "!",
+ ChatColor.WHITE.toString() + ChatColor.RED + "Hello " + ChatColor.BLUE + ChatColor.BOLD + "World" + ChatColor.YELLOW + ChatColor.BOLD + "!",
(component) -> BaseComponent.toLegacyText( component )
);
}
@@ -830,8 +828,8 @@ public class ComponentsTest
String test2 = componentSerializer.apply( componentBuilder.apply( builder ) );
assertEquals(
"{\"extra\":[{\"underlined\":true,\"color\":\"dark_red\",\"text\":\"44444\"},"
- + "{\"color\":\"white\",\"text\":\"dd\"},{\"bold\":true,\"color\":\"gold\",\"text\":\"6666\"},"
- + "{\"color\":\"white\",\"text\":\"rrrr\"}],\"text\":\"\"}",
+ + "{\"color\":\"white\",\"text\":\"dd\"},{\"bold\":true,\"color\":\"gold\",\"text\":\"6666\"},"
+ + "{\"color\":\"white\",\"text\":\"rrrr\"}],\"text\":\"\"}",
test2 );
}
diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/Varint21LengthFieldExtraBufPrepender.java b/protocol/src/main/java/net/md_5/bungee/protocol/Varint21LengthFieldExtraBufPrepender.java
index f5ba162a..c60ee9da 100644
--- a/protocol/src/main/java/net/md_5/bungee/protocol/Varint21LengthFieldExtraBufPrepender.java
+++ b/protocol/src/main/java/net/md_5/bungee/protocol/Varint21LengthFieldExtraBufPrepender.java
@@ -7,7 +7,8 @@ import io.netty.handler.codec.MessageToMessageEncoder;
import java.util.List;
/**
- * Prepend length of the message as a Varint21 using an extra buffer for the length, avoiding copying packet data
+ * Prepend length of the message as a Varint21 using an extra buffer for the
+ * length, avoiding copying packet data
*/
@ChannelHandler.Sharable
public class Varint21LengthFieldExtraBufPrepender extends MessageToMessageEncoder