Facebook
From Unique Dove, 3 Years ago, written in Java.
This paste is a reply to Kod od title i subtitle from HugoZar - view diff
Embed
Download Paste or View Raw
Hits: 280
  1.         public static void sendTitleMessages(Player player, String title, String subtitle, int fadeIn, int stay, int fadeOut){
  2.                 if(title == null){
  3.                         title = "";
  4.                 }
  5.                 if(subtitle == null){
  6.                         subtitle = "";
  7.                 }
  8.                
  9.                 title = title.replace("&", "§");
  10.                 subtitle = subtitle.replace("&", "§");
  11.                
  12.                 CraftPlayer craftPlayer = (CraftPlayer)player;
  13.                
  14.                 PacketPlayOutTitle packetTimes = new PacketPlayOutTitle(EnumTitleAction.TIMES, null, fadeIn, stay, fadeOut);
  15.                 craftPlayer.getHandle().playerConnection.sendPacket(packetTimes);
  16.                
  17.                 IChatBaseComponent chatTitle = ChatSerializer.a("{\"text\": \"" + title + "\"}");
  18.                 PacketPlayOutTitle packetTitle = new PacketPlayOutTitle(EnumTitleAction.TITLE, chatTitle);
  19.                 craftPlayer.getHandle().playerConnection.sendPacket(packetTitle);
  20.                
  21.                 IChatBaseComponent chatSubtitle = ChatSerializer.a("{\"text\": \"" + subtitle + "\"}");
  22.                 PacketPlayOutTitle packetSubtitle = new PacketPlayOutTitle(EnumTitleAction.SUBTITLE, chatSubtitle);
  23.                 craftPlayer.getHandle().playerConnection.sendPacket(packetSubtitle);
  24.         }

Replies to Re: Kod od title i subtitle rss

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