diff --git a/src/main/java/pw/yumc/YumCore/tellraw/Tellraw.java b/src/main/java/pw/yumc/YumCore/tellraw/Tellraw.java index 909bca4..b19c140 100644 --- a/src/main/java/pw/yumc/YumCore/tellraw/Tellraw.java +++ b/src/main/java/pw/yumc/YumCore/tellraw/Tellraw.java @@ -48,6 +48,19 @@ public class Tellraw { return new Tellraw(text); } + /** + * 创建Tellraw + * + * @param text + * 文本 + * @param objects + * 参数 + * @return {@link Tellraw} + */ + public static Tellraw create(final String text, final Object... objects) { + return new Tellraw(String.format(text, objects)); + } + /** * 发送Tellraw公告 */ @@ -224,6 +237,19 @@ public class Tellraw { return then(name).item(ItemSerialize.$(item)); } + /** + * 结束上一串消息 开始下一串数据 + * + * @param text + * 新的文本 + * @param objects + * 参数 + * @return {@link Tellraw} + */ + public Tellraw then(final String text, final Object... objects) { + return then(new MessagePart(String.format(text, objects))); + } + /** * 悬浮消息 *