daily pastebin goal
73%
SHARE
TWEET

Untitled

a guest Jul 11th, 2018 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     @EventHandler
  2.     public void OnDeath(final PlayerDeathEvent e) {
  3.         Player p = e.getEntity();
  4.         Player k = e.getEntity().getKiller();
  5.         if(k == null) {
  6.         }else {
  7.         String text4 = p.getName();
  8.         String text5 = "§c§l" + text4;
  9.         this.runnable = new BukkitRunnable() {
  10.             int test = 1;
  11.             public void run() {
  12.                 if (this.test == 0) {
  13.                     IChatBaseComponent chatTitle = ChatSerializer.a("{\"text\":\"" + text5 + "\"}");
  14.                     PacketPlayOutChat title = new PacketPlayOutChat(chatTitle, ChatMessageType.GAME_INFO);
  15.                     ((CraftPlayer) k).getHandle().playerConnection.sendPacket(title);
  16.                     test++;
  17.                     if(test > text4.length())
  18.                         cancel();
  19.                 }
  20.                 if (this.test == 1) {
  21.                     IChatBaseComponent chatTitle = ChatSerializer.a("{\"text\":\"" + text5 + "\"}");
  22.                     PacketPlayOutChat title = new PacketPlayOutChat(chatTitle, ChatMessageType.GAME_INFO);
  23.                     ((CraftPlayer) k).getHandle().playerConnection.sendPacket(title);
  24.                     test++;
  25.                     if(test > text4.length())
  26.                         cancel();
  27.                        
  28.                 }
  29.                 if (this.test == 2) {
  30.                     String text6 = "§4§l§m" + text4.substring(0, test) + "§c§l" + text4.substring(test, text4.length());
  31.                     IChatBaseComponent chatTitle = ChatSerializer.a("{\"text\":\"" + text6 + "\"}");
  32.                     PacketPlayOutChat title = new PacketPlayOutChat(chatTitle, ChatMessageType.GAME_INFO);
  33.                     ((CraftPlayer) k).getHandle().playerConnection.sendPacket(title);
  34.                     test++;
  35.                     if(test > text4.length())
  36.                         cancel();
  37.                        
  38.                 }
  39.                 if (this.test == 3) {
  40.                     String text7 = "§4§l§m" + text4.substring(0, test) + "§c§l" + text4.substring(test, text4.length());
  41.                     IChatBaseComponent chatTitle = ChatSerializer.a("{\"text\":\"" + text7 + "\"}");
  42.                     PacketPlayOutChat title = new PacketPlayOutChat(chatTitle, ChatMessageType.GAME_INFO);
  43.                     ((CraftPlayer) k).getHandle().playerConnection.sendPacket(title);
  44.                    
  45.                     test++;
  46.                     if(test > text4.length())
  47.                         cancel();
  48.                 }
  49.                 if (this.test == 4) {
  50.                     String text8 = "§4§l§m" + text4.substring(0, test) + "§c§l" + text4.substring(test, text4.length());
  51.                     IChatBaseComponent chatTitle = ChatSerializer.a("{\"text\":\"" + text8 + "\"}");
  52.                     PacketPlayOutChat title = new PacketPlayOutChat(chatTitle, ChatMessageType.GAME_INFO);
  53.                     ((CraftPlayer) k).getHandle().playerConnection.sendPacket(title);
  54.                     test++;
  55.                     if(test > text4.length())
  56.                         cancel();
  57.                        
  58.                 }
  59.                 if (this.test == 5) {
  60.                     String text9 = "§4§l§m" + text4.substring(0, test) + "§c§l" + text4.substring(test, text4.length());
  61.                     IChatBaseComponent chatTitle = ChatSerializer.a("{\"text\":\"" + text9 + "\"}");
  62.                     PacketPlayOutChat title = new PacketPlayOutChat(chatTitle, ChatMessageType.GAME_INFO);
  63.                     ((CraftPlayer) k).getHandle().playerConnection.sendPacket(title);
  64.                     test++;
  65.                     if(test > text4.length())
  66.                         cancel();
  67.                        
  68.                 }
  69.                 if (this.test == 6) {
  70.                     String text9 = "§4§l§m" + text4.substring(0, test) + "§c§l" + text4.substring(test, text4.length());
  71.                     IChatBaseComponent chatTitle = ChatSerializer.a("{\"text\":\"" + text9 + "\"}");
  72.                     PacketPlayOutChat title = new PacketPlayOutChat(chatTitle, ChatMessageType.GAME_INFO);
  73.                     ((CraftPlayer) k).getHandle().playerConnection.sendPacket(title);
  74.                     test++;
  75.                     if(test > text4.length())
  76.                         cancel();
  77.                        
  78.                 }
  79.                 if (this.test == 7) {
  80.                     String text9 = "§4§l§m" + text4.substring(0, test) + "§c§l" + text4.substring(test, text4.length());
  81.                     IChatBaseComponent chatTitle = ChatSerializer.a("{\"text\":\"" + text9 + "\"}");
  82.                     PacketPlayOutChat title = new PacketPlayOutChat(chatTitle, ChatMessageType.GAME_INFO);
  83.                     ((CraftPlayer) k).getHandle().playerConnection.sendPacket(title);
  84.                     test++;
  85.                     if(test > text4.length())
  86.                         cancel();
  87.                        
  88.                 }
  89.                 if (this.test == 8) {
  90.                     String text9 = "§4§l§m" + text4.substring(0, test) + "§c§l" + text4.substring(test, text4.length());
  91.                     IChatBaseComponent chatTitle = ChatSerializer.a("{\"text\":\"" + text9 + "\"}");
  92.                     PacketPlayOutChat title = new PacketPlayOutChat(chatTitle, ChatMessageType.GAME_INFO);
  93.                     ((CraftPlayer) k).getHandle().playerConnection.sendPacket(title);
  94.                     test++;
  95.                     if(test > text4.length())
  96.                         cancel();
  97.                 }
  98.                 ++this.test;
  99.             }
  100.         }; getRunnable().runTaskTimer(this, 0L, 4L);
  101.     }
  102.    
  103. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top