Entities

Untitled

Oct 14th, 2017
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.89 KB | None | 0 0
  1. package me.XXXCanadian.plugin;
  2.  
  3. import org.bukkit.Bukkit;
  4. import org.bukkit.entity.Player;
  5. import org.bukkit.event.EventHandler;
  6. import org.bukkit.event.Listener;
  7. import org.bukkit.event.player.PlayerJoinEvent;
  8. import org.bukkit.scoreboard.DisplaySlot;
  9. import org.bukkit.scoreboard.Objective;
  10. import org.bukkit.scoreboard.Score;
  11. import org.bukkit.scoreboard.ScoreboardManager;
  12.  
  13. import net.md_5.bungee.api.ChatColor;
  14.  
  15. public class Scoreboard implements Listener {
  16.    
  17.    
  18.  
  19.     @EventHandler
  20.     public void join(PlayerJoinEvent event) {
  21.        
  22.         Player player = event.getPlayer();
  23.        
  24.         ScoreboardManager m = Bukkit.getScoreboardManager();
  25.         org.bukkit.scoreboard.Scoreboard b = m.getNewScoreboard();
  26.                
  27.                
  28.         Objective o = b.registerNewObjective("Gold","");
  29.         o.setDisplaySlot(DisplaySlot.SIDEBAR);
  30.         o.setDisplayName(ChatColor.DARK_PURPLE + "PIXELZONE");
  31.        
  32.         Score Space5 = o.getScore(ChatColor.WHITE + " ");
  33.         Space5.setScore(9);
  34.  
  35.         Score line5 = o.getScore(ChatColor.GRAY + "Hub ● " + ChatColor.AQUA + "%online%");
  36.         line5.setScore(8);
  37.        
  38.         Score Space4 = o.getScore(ChatColor.WHITE + " ");
  39.         Space4.setScore(7);
  40.        
  41.         Score line4 = o.getScore(ChatColor.GRAY + "Creative ● " + ChatColor.AQUA + "%online%");
  42.         line4.setScore(6);
  43.        
  44.         Score Space3 = o.getScore(ChatColor.WHITE + " ");
  45.         Space3.setScore(5);
  46.        
  47.         Score line3 = o.getScore(ChatColor.GRAY + "Factions ● " + ChatColor.AQUA + "%online%");
  48.         line3.setScore(4);
  49.        
  50.         Score Space2 = o.getScore(ChatColor.WHITE + " ");
  51.         Space2.setScore(3);
  52.        
  53.         Score line2 = o.getScore(ChatColor.GRAY + "Skyblock ● " + ChatColor.AQUA + "%online%");
  54.         line2.setScore(2);
  55.        
  56.         Score Space1 = o.getScore(ChatColor.WHITE + " ");
  57.         Space1.setScore(1);
  58.        
  59.         player.setScoreboard(b);
  60.                
  61.        
  62.     }
  63.  
  64.     private Objective registerNewObjective(String string, String string2) {
  65.         // TODO Auto-generated method stub
  66.         return null;
  67.     }
  68.    
  69.  
  70. }
Add Comment
Please, Sign In to add comment