1
0
mirror of https://e.coding.net/circlecloud/YumCore.git synced 2024-12-25 07:08:52 +00:00

feat: 添加格式化方法

Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
502647092 2016-09-28 09:08:39 +08:00
parent 233ab96cad
commit a30767c875

View File

@ -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)));
}
/**
* 悬浮消息
*