Guest User

SimpleScoreboard Example

a guest
Apr 30th, 2014
8,471
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.98 KB | None | 0 0
  1. @EventHandler
  2. public void event(PlayerJoinEvent event) {
  3.     Player player = event.getPlayer();
  4.     // create a new scoreboard with title
  5.     SimpleScoreboard scoreboard = new SimpleScoreboard("§a§lFeatures:");
  6.     // text with custom score
  7.     scoreboard.add("§lCustom scores ->", 1337);
  8.     // also supports blank lines (up to 23 of them!)
  9.     scoreboard.blankLine();
  10.     scoreboard.add("§cBLANK LINES");
  11.     scoreboard.blankLine();
  12.     // if you dont specify a score it will display them in the order you add them in
  13.     scoreboard.add("lines");
  14.     scoreboard.add("§bin");
  15.     scoreboard.add("§edescending");
  16.     scoreboard.add("§2order");
  17.     scoreboard.add(":)");
  18.     scoreboard.blankLine();
  19.     // the text can be up to 48 characters long (including color codes)
  20.     scoreboard.add("and long lines with up to §l48 characters");
  21.     // call this to create the scoreboard, nothing will happen if you forget to call this
  22.     scoreboard.build();
  23.     // send the scoreboard to the player(s), takes an array
  24.     scoreboard.send(player);
  25. }
Advertisement
Add Comment
Please, Sign In to add comment