feat: 添加Title公告发送方法

Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
502647092 2016-09-13 17:01:46 +08:00
parent 6c819839cd
commit ed17f40cba
1 changed files with 46 additions and 0 deletions

View File

@ -281,6 +281,52 @@ public class C {
} }
public static class Title { public static class Title {
/**
* 发送Title公告
*
* @param title
* 标题
* @param subtitle
* 子标题
*/
public static void broadcast(final String title, final String subtitle) {
for (final org.bukkit.entity.Player player : Player.getOnlinePlayers()) {
send(player, title, subtitle);
}
}
/**
* 发送Title公告
*
* @param title
* 标题
* @param subtitle
* 子标题
*/
public static void broadcast(final String title, final String subtitle, final int fadeInTime, final int stayTime, final int fadeOutTime) {
for (final org.bukkit.entity.Player player : Player.getOnlinePlayers()) {
send(player, title, subtitle, fadeInTime, stayTime, fadeOutTime);
}
}
/**
* 发送Title公告
*
* @param world
* 世界
* @param title
* 标题
* @param subtitle
* 子标题
*/
public static void broadcast(final World world, final String title, final String subtitle) {
for (final org.bukkit.entity.Player player : Player.getOnlinePlayers()) {
if (player.getWorld().getName().equalsIgnoreCase(world.getName())) {
send(player, title, subtitle);
}
}
}
/** /**
* 重置玩家的Title * 重置玩家的Title
* *