From c803f42a847dd0bd93768ed08490905b7815c1e4 Mon Sep 17 00:00:00 2001 From: Max Lee Date: Fri, 26 Jun 2020 00:52:31 +0100 Subject: [PATCH] #2867: Add font setter to ComponentBuilder --- .../net/md_5/bungee/api/chat/ComponentBuilder.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 2ca59f75..1f8dd4c8 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 @@ -324,6 +324,18 @@ public final class ComponentBuilder return this; } + /** + * Sets the font of the current part. + * + * @param font the new font + * @return this ComponentBuilder for chaining + */ + public ComponentBuilder font(String font) + { + getCurrentComponent().setFont( font ); + return this; + } + /** * Sets whether the current part is bold. *