SHARE
TWEET

Untitled

a guest Jul 18th, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     public void sendScoreboard(Player p) {
  2.         Scoreboard board = new Scoreboard();
  3.         ScoreboardObjective obj = board.registerObjective("§ePlotSpace.net", IScoreboardCriteria.b);
  4.        
  5.         PacketPlayOutScoreboardObjective createPacket = new PacketPlayOutScoreboardObjective(obj, 0);
  6.         PacketPlayOutScoreboardObjective removePacket = new PacketPlayOutScoreboardObjective(obj, 1);
  7.         PacketPlayOutScoreboardDisplayObjective display = new PacketPlayOutScoreboardDisplayObjective(1, obj);
  8.         obj.setDisplayName("§ePlotSpace.net");
  9.        
  10.         ScoreboardScore s01 = new ScoreboardScore(board, obj, "§1");
  11.        
  12.         ScoreboardScore s02 = new ScoreboardScore(board, obj, "§7» §e§lDein Profil:");
  13.         ScoreboardScore s03 = new ScoreboardScore(board, obj, "§e" + p.getName());
  14.        
  15.         ScoreboardScore s04 = new ScoreboardScore(board, obj, "§2");
  16.        
  17.         ScoreboardScore s05 = new ScoreboardScore(board, obj, "§7» §e§lDein Rang:");
  18.         if(p.hasPermission("plotspace.owner")) {
  19.             ScoreboardScore s06 = new ScoreboardScore(board, obj, "§4§lOwner");
  20.         }else {
  21.             ScoreboardScore s06 = new ScoreboardScore(board, obj, "$7Spieler");
  22.         }
  23.  
  24.        
  25.         ScoreboardScore s07 = new ScoreboardScore(board, obj, "§3");
  26.        
  27.         ScoreboardScore s08 = new ScoreboardScore(board, obj, "§7» §e§lDeine Coins");
  28.         ScoreboardScore s09 = new ScoreboardScore(board, obj, "§e" + CoinsAPI.getCoins(p.getUniqueId().toString()));
  29.        
  30.        
  31.        
  32.         s01.setScore(16);
  33.         s02.setScore(15);
  34.         s03.setScore(14);
  35.         s04.setScore(13);
  36.         s05.setScore(12);
  37.         s06.setScore(11);
  38.         s07.setScore(10);
  39.         s08.setScore(9);
  40.         s09.setScore(8);
  41.        
  42.         PacketPlayOutScoreboardScore ps01 = new PacketPlayOutScoreboardScore(s01);
  43.         PacketPlayOutScoreboardScore ps02 = new PacketPlayOutScoreboardScore(s02);
  44.         PacketPlayOutScoreboardScore ps03 = new PacketPlayOutScoreboardScore(s03);
  45.         PacketPlayOutScoreboardScore ps04 = new PacketPlayOutScoreboardScore(s04);
  46.         PacketPlayOutScoreboardScore ps05 = new PacketPlayOutScoreboardScore(s05);
  47.         PacketPlayOutScoreboardScore ps06 = new PacketPlayOutScoreboardScore(s06);
  48.         PacketPlayOutScoreboardScore ps07 = new PacketPlayOutScoreboardScore(s07);
  49.         PacketPlayOutScoreboardScore ps08 = new PacketPlayOutScoreboardScore(s08);
  50.         PacketPlayOutScoreboardScore ps09 = new PacketPlayOutScoreboardScore(s09);
  51.        
  52.  
  53.         sendPacket(p, removePacket);
  54.         sendPacket(p, createPacket);
  55.         sendPacket(p, display);
  56.         sendPacket(p, ps01);
  57.         sendPacket(p, ps02);
  58.         sendPacket(p, ps03);
  59.         sendPacket(p, ps04);
  60.         sendPacket(p, ps05);
  61.         sendPacket(p, ps06);
  62.         sendPacket(p, ps07);
  63.         sendPacket(p, ps08);
  64.         sendPacket(p, ps09);
  65.     }
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top