Skip to content

Instantly share code, notes, and snippets.

@lucko
Created October 6, 2017 20:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucko/8cf0f7bed8e4e5a17f222618f722141a to your computer and use it in GitHub Desktop.
Save lucko/8cf0f7bed8e4e5a17f222618f722141a to your computer and use it in GitHub Desktop.
Scoreboard scoreboard = GlobalScoreboard.get();
ScoreboardObjective objective = scoreboard.createObjective("big scoreboard", DisplaySlot.SIDEBAR);
ScoreboardTeam team = scoreboard.createTeam("test-team");
String p1 = "hi there. this i", p2 = "s a 72 character long scoreboard line. p", p3 = "retty cool huh?!";
team.setPrefix(p1);
team.setSuffix(p3);
team.addPlayer(p2);
objective.applyLines(
"len: " + (p1.length() + p2.length() + p3.length()),
p2
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment