Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as Java by Larr4k ( 7 years ago )
public static void updateScoreboard1(final Player p) {
p.getScoreboard().clearSlot(DisplaySlot.SIDEBAR);
final Scoreboard playerBoard = p.getScoreboard();
String oldname = "";
if (p.getScoreboard() != null && p.getScoreboard().getObjective(DisplaySlot.SIDEBAR) != null) {
oldname = p.getScoreboard().getObjective(DisplaySlot.SIDEBAR).getDisplayName();
}
for (final Objective obj : playerBoard.getObjectives()) {
obj.unregister();
}
final Objective stats = playerBoard.registerNewObjective("Stats", "dummy");
stats.setDisplaySlot(DisplaySlot.SIDEBAR);
stats.setDisplayName(oldname);
stats.getScore("§aСтатистика:").setScore(14);
stats.getScore(" ").setScore(13);
stats.getScore("§fУровень §8» §e" + PrisonPlayer.getLevel(p)).setScore(12);
stats.getScore("§fБаланс §8» §a" + Math.rint(100.0 * PrisonPlayer.getBalance(p)) / 100.0 + "$").setScore(11);
if (!PrisonPlayer.faction.containsKey(p.getName())) {
stats.getScore("§fФракция §8» §7Не имеется").setScore(10);
}
else if (PrisonPlayer.faction.get(p.getName()).equalsIgnoreCase("White")) {
stats.getScore("§fФракция §8» §fБелокожие").setScore(10);
}
else if (PrisonPlayer.faction.get(p.getName()).equalsIgnoreCase("Black")) {
stats.getScore("§fФракция §8» §7Афро-Американцы").setScore(101);
}
else if (PrisonPlayer.faction.get(p.getName()).equalsIgnoreCase("Asian")) {
stats.getScore("§fФракция §8» §eУзкоглазые").setScore(10);
}
stats.getScore("§fБлоки §8§l» §d§l" + formatBlocks(p)).setScore(9);
stats.getScore("§fУбийств §8» §e" + PrisonPlayer.getKills(p)).setScore(8);
stats.getScore("§fКрыс убито §8» §6" + PrisonPlayer.getRats(p)).setScore(7);
stats.getScore("§fУбито боссов §8» §6" + PrisonPlayer.getBosses(p)).setScore(5);
stats.getScore(" ").setScore(4);
stats.getScore("§fОнлайн §8» §a" + PrisonPlayer.getOnlinePlayers()).setScore(3);
stats.getScore(" ").setScore(2);
stats.getScore("§awww.hnm.su").setScore(1);
p.setScoreboard(playerBoard);
}
Revise this Paste