Guest User

Untitled

a guest
Aug 27th, 2021
30
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package Methoden;
  2.  
  3. import org.bukkit.Bukkit;
  4. import org.bukkit.entity.Player;
  5. import org.bukkit.scoreboard.DisplaySlot;
  6. import org.bukkit.scoreboard.Objective;
  7. import org.bukkit.scoreboard.Scoreboard;
  8. import org.bukkit.scoreboard.ScoreboardManager;
  9.  
  10. public class Methoden {
  11.  
  12. public static void setScoreboard(Player player) {
  13. ScoreboardManager sm = Bukkit.getScoreboardManager();
  14. Scoreboard board = sm.getNewScoreboard();
  15. Objective obj = board.registerNewObjective("test", "dummy");
  16.  
  17. obj.setDisplaySlot(DisplaySlot.SIDEBAR);
  18. obj.setDisplayName("§1>§5MineLagDE§1<");
  19. obj.getScore("§4").setScore(13);
  20. obj.getScore("§b§lRang").setScore(12);
  21.  
  22. if(player.hasPermission("prefix.owner")) {
  23. obj.getScore("§4§lOwner").setScore(11);
  24. }else if(player.hasPermission("prefix.admin")) {
  25. obj.getScore("§cAdmin").setScore(11);
  26. }else if(player.hasPermission("prefix.entwickler")) {
  27. obj.getScore("§bEntwickler").setScore(11);
  28. }else if(player.hasPermission("prefix.mod")) {
  29. obj.getScore("§3Moderator").setScore(11);
  30. }else if(player.hasPermission("prefix.supporter")) {
  31. obj.getScore("§5Supporter").setScore(11);
  32. }else if(player.hasPermission("prefix.tsupporter")) {
  33. obj.getScore("§dT-Supporter").setScore(11);
  34. }else if(player.hasPermission("prefix.builder")) {
  35. obj.getScore("§aBuilder").setScore(11);
  36. }else if(player.hasPermission("prefix.gold")) {
  37. obj.getScore("§6VIP-Gold").setScore(11);
  38. }else if(player.hasPermission("prefix.ultra")) {
  39. obj.getScore("§bVIP-Ultra").setScore(11);
  40. }else if(player.hasPermission("prefix.vip")) {
  41. obj.getScore("§eVIP").setScore(11);
  42. }else
  43. obj.getScore("§7Zivilist").setScore(11);
  44.  
  45. obj.getScore("§b§lName:").setScore(10);
  46. obj.getScore("§a"+ player.getName()).setScore(9);
  47. obj.getScore("§4").setScore(8);
  48. obj.getScore("Kontostand").setScore(7);
  49. obj.getScore("Comming Soon").setScore(6);
  50. obj.getScore("§4").setScore(5);
  51. obj.getScore("§bOnline").setScore(4);
  52. obj.getScore("§l"+ Bukkit.getOnlinePlayers().size() +"§b/§l"+ Bukkit.getMaxPlayers()).setScore(3);
  53. obj.getScore("§4").setScore(2);
  54. obj.getScore("§b§lCommands").setScore(1);
  55. obj.getScore("§7/Commands").setScore(0);
  56.  
  57. player.setScoreboard(board);
  58. }
  59. }
  60.  
RAW Paste Data