SHARE
TWEET

Untitled

a guest Aug 14th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     @SuppressWarnings("deprecation")
  2.     public static void sendTablist(Player player){
  3.         IChatBaseComponent header = new ChatMessage("\n§5❉ §6§lDrCraft.de §5❉\n");
  4.         IChatBaseComponent footer = new ChatMessage("\n§5Ränge,§a Crates §fund §cMEHR§f!\n§e§lshop.drcraft.de\n");
  5.         PacketPlayOutPlayerListHeaderFooter tablist = new PacketPlayOutPlayerListHeaderFooter();
  6.         try {
  7.                 Field headerField = tablist.getClass().getDeclaredField("header");
  8.                 headerField.setAccessible(true);
  9.                 headerField.set(tablist, header);
  10.                 headerField.setAccessible(!headerField.isAccessible());
  11.                 Field footerField = tablist.getClass().getDeclaredField("footer");
  12.                 footerField.setAccessible(true);
  13.                 footerField.set(tablist, footer);
  14.                 footerField.setAccessible(!footerField.isAccessible());
  15.         } catch (Exception e) {
  16.                 e.printStackTrace();
  17.         }
  18.         CraftPlayer cp = (CraftPlayer) player;
  19.         cp.getHandle().playerConnection.sendPacket(tablist);
  20.     }
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