Advertisement
Guest User

Untitled

a guest
Dec 19th, 2014
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.74 KB | None | 0 0
  1.     public void sendScoreboard(Player player, int kills, int deaths) {
  2.        
  3.         //create the scoreboard object that we enter text in with the title we define "My scoreboard"
  4.         EZScoreboard scoreboard = new EZScoreboard(ChatColor.translateAlternateColorCodes('&', "&bMy scoreboard"));
  5.         //add a blank line as the top line of the scoreboard
  6.         scoreboard.blank();
  7.         //add a line with some text
  8.         scoreboard.setLine(ChatColor.translateAlternateColorCodes('&', "kills: "+kills));  
  9.         //add deaths
  10.         scoreboard.setLine(ChatColor.translateAlternateColorCodes('&', "deaths: "+deaths));
  11.         //ALWAYS DO THIS AFTER YOU ARE FINISHED ADDING THE TEXT TO THE SCOREBOARD
  12.         scoreboard.build();
  13.         //SEND THE SCOREBOARD TO THE PLAYER
  14.         scoreboard.send(player);
  15.         return;
  16.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement