BlaquuTM

Untitled

Jun 28th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. @SuppressWarnings("deprecation")
  2. public void create() {
  3. if (!Config.SIDEBAR_ENABLE) {
  4. return;
  5. }
  6. this.prefix = new String[this.message.size()];
  7. this.suffix = new String[this.message.size()];
  8. final Scoreboard sb = this.user.getScoreboard();
  9. if (sb == null) {
  10. return;
  11. }
  12. Objective ob = sb.getObjective("MH_SIDEBAR");
  13. if (ob == null) {
  14. ob = sb.registerNewObjective("MH_SIDEBAR", "dummy");
  15. ob.setDisplaySlot(DisplaySlot.SIDEBAR);
  16. }
  17. ob.setDisplayName(Config.SIDEBAR_HEADER);
  18. final String[] scheme = Scheme.getInst().getSchemeSidebar();
  19. int ii = 0;
  20. for (int i = 0; i < this.message.size(); ++i) {
  21. --ii;
  22. ob.getScore(new OfflineUser(scheme[i])).setScore(ii);
  23. }
  24. this.update();
  25. }
Advertisement
Add Comment
Please, Sign In to add comment