Facebook
From Unique Dove, 9 Years ago, written in Java.
This paste is a reply to Kod od title i subtitle from HugoZar - go back
Embed
Viewing differences between Kod od title i subtitle and Re: Kod od title i subtitle
        public static void sendTitleMessages(Player player, String title, String subtitle, int fadeIn, int stay, int fadeOut){
                if(title == null){
                        title = "";
                }
                if(subtitle == null){
                        subtitle = "";
                }
                
                title = title.replace("&", "§");
                subtitle = subtitle.replace("&", "§");
                
                CraftPlayer craftPlayer = (CraftPlayer)player;
                
                PacketPlayOutTitle packetTimes = new PacketPlayOutTitle(EnumTitleAction.TIMES, null, fadeIn, stay, fadeOut);
                craftPlayer.getHandle().playerConnection.sendPacket(packetTimes);
                
                IChatBaseComponent chatTitle = ChatSerializer.a("{\"text\": \"" + title + "\"}");
                PacketPlayOutTitle packetTitle = new PacketPlayOutTitle(EnumTitleAction.TITLE, chatTitle);
                craftPlayer.getHandle().playerConnection.sendPacket(packetTitle);
                
                IChatBaseComponent chatSubtitle = ChatSerializer.a("{\"text\": \"" + subtitle + "\"}");
                PacketPlayOutTitle packetSubtitle = new PacketPlayOutTitle(EnumTitleAction.SUBTITLE, chatSubtitle);
                craftPlayer.getHandle().playerConnection.sendPacket(packetSubtitle);
        }

Replies to Re: Kod od title i subtitle rss

Title Name Language When
Re: Re: Kod od title i subtitle Ample Agouti java 7 Years ago.