Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void sendTitle(Player player, String title, String subtitle, int fadeIn, int stay, int fadeOut) {
- PacketPlayOutTitle aTitle = new PacketPlayOutTitle(EnumTitleAction.TITLE, ChatSerializer.a(ChatColor.translateAlternateColorCodes('&', "{\"text\": \"" + title + "\"}")), fadeIn, stay, fadeOut);
- PacketPlayOutTitle aSubtitle = new PacketPlayOutTitle(EnumTitleAction.SUBTITLE, ChatSerializer.a(ChatColor.translateAlternateColorCodes('&', "{\"text\": \"" + subtitle + "\"}")), fadeIn, stay, fadeOut);
- ((CraftPlayer) player).getHandle().getConnection().sendPacket(aTitle);
- ((CraftPlayer) player).getHandle().getConnection().sendPacket(aSubtitle);
- }
Advertisement
Add Comment
Please, Sign In to add comment