Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.meccascoreboard.rpghud;
- import org.bukkit.ChatColor;
- import org.bukkit.scoreboard.Objective;
- import org.bukkit.scoreboard.Score;
- import java.util.ArrayList;
- import java.util.List;
- /**
- * Created by TheAwesomeGem on 4/5/2015.
- */
- public class CustomScore
- {
- public String Name;
- public String Value;
- public String Suffix;
- public ChatColor NameCol;
- public ChatColor ValCol;
- public int Slot;
- public CustomScore(String name, String value, String suffix, ChatColor nameColor, ChatColor valCol, int slot)
- {
- Name = name;
- Value = value;
- Suffix = suffix;
- NameCol = nameColor;
- ValCol = valCol;
- Slot = slot + 1;
- }
- public void setScore(Objective objective)
- {
- List<Score> scores = new ArrayList<>();
- scores.add(0, objective.getScore(NameCol + Name + Suffix + " "));
- scores.add(1, objective.getScore(ValCol + Value + " "));
- scores.get(1).setScore(Slot - 1);
- scores.get(0).setScore(Slot);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement