Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @SuppressWarnings("deprecation")
- public void create() {
- if (!Config.SIDEBAR_ENABLE) {
- return;
- }
- this.prefix = new String[this.message.size()];
- this.suffix = new String[this.message.size()];
- final Scoreboard sb = this.user.getScoreboard();
- if (sb == null) {
- return;
- }
- Objective ob = sb.getObjective("MH_SIDEBAR");
- if (ob == null) {
- ob = sb.registerNewObjective("MH_SIDEBAR", "dummy");
- ob.setDisplaySlot(DisplaySlot.SIDEBAR);
- }
- ob.setDisplayName(Config.SIDEBAR_HEADER);
- final String[] scheme = Scheme.getInst().getSchemeSidebar();
- int ii = 0;
- for (int i = 0; i < this.message.size(); ++i) {
- --ii;
- ob.getScore(new OfflineUser(scheme[i])).setScore(ii);
- }
- this.update();
- }
Advertisement
Add Comment
Please, Sign In to add comment