Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package de.EinJavaDev.UTILS;
- import java.io.File;
- import java.util.UUID;
- import de.API.UFT8;
- import org.bukkit.Bukkit;
- import org.bukkit.ChatColor;
- import org.bukkit.configuration.file.FileConfiguration;
- import org.bukkit.configuration.file.YamlConfiguration;
- import org.bukkit.entity.Player;
- import org.bukkit.scoreboard.DisplaySlot;
- import org.bukkit.scoreboard.Objective;
- import org.bukkit.scoreboard.Scoreboard;
- import org.bukkit.scoreboard.Team;
- public class BOARD {
- public BOARD(final Player player){
- }
- public static Integer getTickets(UUID uuid)
- {
- File file = new File("plugins/LobbySystem", "tickets.yml");
- FileConfiguration cfg = YamlConfiguration.loadConfiguration(file);
- int money = cfg.getInt(uuid + ".tickets");
- return Integer.valueOf(money);
- }
- public static Integer getMoney(UUID uuid)
- {
- File file = new File("plugins/LobbySystem", "money.yml");
- FileConfiguration cfg = YamlConfiguration.loadConfiguration(file);
- int money = cfg.getInt(uuid + ".money");
- return Integer.valueOf(money);
- }
- public static void setBoard(Player p) {
- org.bukkit.scoreboard.Scoreboard boa = Bukkit.getScoreboardManager().getNewScoreboard();
- Objective ob = boa.registerNewObjective("cccc", "dddd");
- ob.setDisplaySlot(DisplaySlot.SIDEBAR);
- ob.setDisplayName("§7« §b§lERAPED§7§l.§3§lNET §r§7»");
- ob.getScore("§8§m§r§8§m----------------§1").setScore(9);
- ob.getScore("§8" + UFT8.CIRCEL + "§7» §7Rang:").setScore(8);
- if (p.hasPermission("System.Admin")) {
- ob.getScore("§7§l" + UFT8.CIRCEL + "§8» §cAdmin").setScore(7);
- } else if (p.hasPermission("System.Mod")) {
- ob.getScore("§7§l" + UFT8.CIRCEL + "§8» §9Mod").setScore(7);
- } else if (p.hasPermission("System.Developer")) {
- ob.getScore("§7§l" + UFT8.CIRCEL + "§8» §bDeveloper").setScore(7);
- } else if (p.hasPermission("System.Supporter")) {
- ob.getScore("§7§l" + UFT8.CIRCEL + "§8» §1Sup").setScore(7);
- } else if (p.hasPermission("System.Builder")) {
- ob.getScore("§7§l" + UFT8.CIRCEL + "§8» §aBuilder").setScore(7);
- } else if (p.hasPermission("System.Premium")) {
- ob.getScore("§7§l" + UFT8.CIRCEL + "§8» §6Premium").setScore(7);
- } else {
- ob.getScore("§7" + UFT8.CIRCEL + "§8» Player").setScore(7);
- }
- ob.getScore(" §2").setScore(6);
- ob.getScore("§8" + UFT8.CIRCEL + "§7» §7Coins:").setScore(5);
- ob.getScore("§7§l" + UFT8.CIRCEL + "§8» §e " + getMoney(p.getUniqueId()) + "§4").setScore(4);
- ob.getScore(" §7").setScore(3);
- ob.getScore("§8" + UFT8.CIRCEL + "§7» §7Tickets:").setScore(2);
- ob.getScore("§7§l" + UFT8.CIRCEL + "§8» §e " + getTickets(p.getUniqueId())).setScore(1);
- ob.getScore(" §8").setScore(0);
- ob.getScore("§8" + UFT8.CIRCEL + "§7» §7Nick:").setScore(-1);
- ob.getScore("§7§l" + UFT8.CIRCEL + "§8» §e " + p.getDisplayName()).setScore(-2);
- ob.getScore("§8§m§r§8§m----------------").setScore(-3);
- p.setScoreboard(boa);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement