Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void sendScoreboard(Player player, int kills, int deaths) {
- //create the scoreboard object that we enter text in with the title we define "My scoreboard"
- EZScoreboard scoreboard = new EZScoreboard(ChatColor.translateAlternateColorCodes('&', "&bMy scoreboard"));
- //add a blank line as the top line of the scoreboard
- scoreboard.blank();
- //add a line with some text
- scoreboard.setLine(ChatColor.translateAlternateColorCodes('&', "kills: "+kills));
- //add deaths
- scoreboard.setLine(ChatColor.translateAlternateColorCodes('&', "deaths: "+deaths));
- //ALWAYS DO THIS AFTER YOU ARE FINISHED ADDING THE TEXT TO THE SCOREBOARD
- scoreboard.build();
- //SEND THE SCOREBOARD TO THE PLAYER
- scoreboard.send(player);
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement