Made FormatableChat final
This commit is contained in:
parent
9990ce3900
commit
7a19f543cc
@ -39,7 +39,7 @@ public abstract class Chat extends ChatStatic implements HoverEventSource<Compon
|
||||
protected ComponentBuilder<?, ?> builder;
|
||||
protected boolean console = false;
|
||||
|
||||
protected Chat(ComponentBuilder<?, ?> b) {
|
||||
/* package */ Chat(ComponentBuilder<?, ?> b) {
|
||||
Objects.requireNonNull(b, "Provided component builder must not be null");
|
||||
builder = b;
|
||||
}
|
||||
@ -210,7 +210,7 @@ public abstract class Chat extends ChatStatic implements HoverEventSource<Compon
|
||||
|
||||
|
||||
|
||||
public static class FormatableChat extends Chat {
|
||||
public static final class FormatableChat extends Chat {
|
||||
/* package */ FormatableChat(ComponentBuilder<?, ?> c) {
|
||||
super(c);
|
||||
}
|
||||
|
@ -19,6 +19,10 @@ public abstract class ChatStatic {
|
||||
public static FormatableChat chatComponent(BaseComponent c) {
|
||||
return new FormatableChat(Chat.componentToBuilder(Chat.toAdventure(c)));
|
||||
}
|
||||
|
||||
public static FormatableChat chatComponent(Chat c) {
|
||||
return chatComponent(c.getAdv());
|
||||
}
|
||||
|
||||
public static FormatableChat chat() {
|
||||
return new FormatableChat(Component.text());
|
||||
|
Loading…
Reference in New Issue
Block a user