SHARE
TWEET

Untitled

a guest Oct 16th, 2019 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package de.EinJavaDev.UTILS;
  2.  
  3. import java.io.File;
  4. import java.util.UUID;
  5.  
  6. import de.API.UFT8;
  7. import org.bukkit.Bukkit;
  8. import org.bukkit.ChatColor;
  9. import org.bukkit.configuration.file.FileConfiguration;
  10. import org.bukkit.configuration.file.YamlConfiguration;
  11. import org.bukkit.entity.Player;
  12. import org.bukkit.scoreboard.DisplaySlot;
  13. import org.bukkit.scoreboard.Objective;
  14. import org.bukkit.scoreboard.Scoreboard;
  15. import org.bukkit.scoreboard.Team;
  16.  
  17. public class BOARD {
  18.  
  19.     public BOARD(final Player player){
  20.  
  21.     }
  22.  
  23.  
  24.     public static Integer getTickets(UUID uuid)
  25.     {
  26.         File file = new File("plugins/LobbySystem", "tickets.yml");
  27.         FileConfiguration cfg = YamlConfiguration.loadConfiguration(file);
  28.         int money = cfg.getInt(uuid + ".tickets");
  29.         return Integer.valueOf(money);
  30.     }
  31.  
  32.     public static Integer getMoney(UUID uuid)
  33.     {
  34.         File file = new File("plugins/LobbySystem", "money.yml");
  35.         FileConfiguration cfg = YamlConfiguration.loadConfiguration(file);
  36.         int money = cfg.getInt(uuid + ".money");
  37.         return Integer.valueOf(money);
  38.     }
  39.  
  40.     public static void setBoard(Player p) {
  41.         org.bukkit.scoreboard.Scoreboard boa = Bukkit.getScoreboardManager().getNewScoreboard();
  42.         Objective ob = boa.registerNewObjective("cccc", "dddd");
  43.         ob.setDisplaySlot(DisplaySlot.SIDEBAR);
  44.         ob.setDisplayName("§7« §b§lERAPED§7§l.§3§lNET §r§7»");
  45.         ob.getScore("§8§m§r§8§m----------------§1").setScore(9);
  46.         ob.getScore("§8" + UFT8.CIRCEL + "§7» §7Rang:").setScore(8);
  47.         if (p.hasPermission("System.Admin")) {
  48.             ob.getScore("§7§l" + UFT8.CIRCEL + "§8»  §cAdmin").setScore(7);
  49.         } else if (p.hasPermission("System.Mod")) {
  50.             ob.getScore("§7§l" + UFT8.CIRCEL + "§8»  §9Mod").setScore(7);
  51.         } else if (p.hasPermission("System.Developer")) {
  52.             ob.getScore("§7§l" + UFT8.CIRCEL + "§8»  §bDeveloper").setScore(7);
  53.         } else if (p.hasPermission("System.Supporter")) {
  54.             ob.getScore("§7§l" + UFT8.CIRCEL + "§8»  §1Sup").setScore(7);
  55.         } else if (p.hasPermission("System.Builder")) {
  56.             ob.getScore("§7§l" + UFT8.CIRCEL + "§8»  §aBuilder").setScore(7);
  57.         } else if (p.hasPermission("System.Premium")) {
  58.             ob.getScore("§7§l" + UFT8.CIRCEL + "§8»  §6Premium").setScore(7);
  59.         } else {
  60.             ob.getScore("§7" + UFT8.CIRCEL + "§8»  Player").setScore(7);
  61.         }
  62.         ob.getScore("  §2").setScore(6);
  63.         ob.getScore("§8" + UFT8.CIRCEL + "§7» §7Coins:").setScore(5);
  64.         ob.getScore("§7§l" + UFT8.CIRCEL + "§8» §e " + getMoney(p.getUniqueId()) + "§4").setScore(4);
  65.         ob.getScore("   §7").setScore(3);
  66.         ob.getScore("§8" + UFT8.CIRCEL + "§7» §7Tickets:").setScore(2);
  67.         ob.getScore("§7§l" + UFT8.CIRCEL + "§8» §e " + getTickets(p.getUniqueId())).setScore(1);
  68.         ob.getScore("   §8").setScore(0);
  69.         ob.getScore("§8" + UFT8.CIRCEL + "§7» §7Nick:").setScore(-1);
  70.         ob.getScore("§7§l" + UFT8.CIRCEL + "§8» §e " + p.getDisplayName()).setScore(-2);
  71.         ob.getScore("§8§m§r§8§m----------------").setScore(-3);
  72.         p.setScoreboard(boa);
  73.     }
  74.  
  75. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top