Guest User

Untitled

a guest
Dec 24th, 2017
137
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Tab_Prefix implements Listener{
  2.  
  3. Team Owner;
  4. Team Lead_Developer;
  5. Team System_Developer;
  6. Team Senior_Developer;
  7. Team Junior_Developer;
  8. Team Manager;
  9. Team Admin;
  10. Team Moderator;
  11. Team Trainee;
  12.  
  13. Team Player;
  14. Team YouTube;
  15. Team Twitch;
  16.  
  17. Team Hero;
  18. Team Pro;
  19. Team Ultra;
  20. Team Elite;
  21. Team Legend;
  22.  
  23. ScoreboardManager sco;
  24. Scoreboard sb;
  25.  
  26. public void onRegisterTabListRanks() {
  27. sco = Bukkit.getScoreboardManager();
  28. sb = sco.getMainScoreboard();
  29.  
  30. Owner = sb.registerNewTeam("Owner");
  31. Lead_Developer = sb.registerNewTeam("Lead_Developer");
  32. System_Developer = sb.registerNewTeam("System_Developer");
  33. Senior_Developer = sb.registerNewTeam("Senior_Developer");
  34. Junior_Developer = sb.registerNewTeam("Junior_Developer");
  35. Manager = sb.registerNewTeam("Manager");
  36. Admin = sb.registerNewTeam("Admin");
  37. Moderator = sb.registerNewTeam("Moderator");
  38. Trainee = sb.registerNewTeam("Trainee");
  39.  
  40. Player = sb.registerNewTeam("Player");
  41. YouTube = sb.registerNewTeam("YouTube");
  42. Twitch = sb.registerNewTeam("Twitch");
  43.  
  44. Hero = sb.registerNewTeam("Hero");
  45. Pro = sb.registerNewTeam("Pro");
  46. Ultra = sb.registerNewTeam("Ultra");
  47. Elite = sb.registerNewTeam("Elite");
  48. Legend = sb.registerNewTeam("Legend");
  49. }
  50.  
  51. public void setTabPrefix(){
  52. Owner.setPrefix("§a[Owner] ");
  53. Lead_Developer.setPrefix("§4[Ld.Dev] ");
  54. System_Developer.setPrefix("§4[Sys.Dev] ");
  55. Senior_Developer.setPrefix("§4[Dev] ");
  56. Junior_Developer.setPrefix("§4[Jr.Dev] ");
  57. Manager.setPrefix("§9[Manager] ");
  58. Admin.setPrefix("§c[Admin] ");
  59. Moderator.setPrefix("§2[Mod] ");
  60. Trainee.setPrefix("§e[Trainee] ");
  61.  
  62. Player.setPrefix("§7");
  63. YouTube.setPrefix("§c[YouTube]");
  64. Twitch.setPrefix("§9[Twitch] ");
  65.  
  66. Hero.setPrefix("§b[Hero] ");
  67. Pro.setPrefix("§6[Pro] ");
  68. Ultra.setPrefix("§d[Ultra] ");
  69. Elite.setPrefix("§3[Elite] ");
  70. Legend.setPrefix("§5[Legend] ");
  71. }
  72.  
  73. @SuppressWarnings("deprecation")
  74. @EventHandler
  75. public void onJoin(PlayerJoinEvent event){
  76. Player player = event.getPlayer();
  77.  
  78. player.setScoreboard(sb);
  79. if (player.hasPermission(MessageUtil.OWNER_PERRISSION)){
  80. Owner.addPlayer(player);
  81. } else if (player.hasPermission(MessageUtil.LEAD_DEV_PERMISSION)){
  82. Lead_Developer.addPlayer(player);
  83. } else if (player.hasPermission(MessageUtil.SYS_DEV_PERMISSION)){
  84. System_Developer.addPlayer(player);
  85. } else if (player.hasPermission(MessageUtil.DEV_PERMISSION)){
  86. Senior_Developer.addPlayer(player);
  87. } else if (player.hasPermission(MessageUtil.JR_DEV_PERMISSION)){
  88. Junior_Developer.addPlayer(player);
  89. } else if (player.hasPermission(MessageUtil.MANAGER_PERMISSION)){
  90. Manager.addPlayer(player);
  91. } else if (player.hasPermission(MessageUtil.ADMIN_PERMISSION)){
  92. Admin.addPlayer(player);
  93. } else if (player.hasPermission(MessageUtil.MOD_PERMISSION)){
  94. Moderator.addPlayer(player);
  95. } else if (player.hasPermission(MessageUtil.TRAINEE_PERMISSION)){
  96. Trainee.addPlayer(player);
  97. } else if (player.hasPermission(MessageUtil.YOUTUBE_PERMISSION)){
  98. YouTube.addPlayer(player);
  99. } else if (player.hasPermission(MessageUtil.TWITCH_PERMISSION)){
  100. Twitch.addPlayer(player);
  101. } else if (player.hasPermission(MessageUtil.HERO_PERMISSION)){
  102. Hero.addPlayer(player);
  103. } else if (player.hasPermission(MessageUtil.PRO_PERMISSION)){
  104. Pro.addPlayer(player);
  105. } else if (player.hasPermission(MessageUtil.ULTRA_PERMISSION)){
  106. Ultra.addPlayer(player);
  107. } else if (player.hasPermission(MessageUtil.ELITE_PERMISSION)){
  108. Elite.addPlayer(player);
  109. } else if (player.hasPermission(MessageUtil.LEGEND_PERMISSION)){
  110. Legend.addPlayer(player);
  111. } else {
  112. Player.addPlayer(player);
  113. }
  114. }
  115.  
  116.  
  117. }
RAW Paste Data