Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.XXXCanadian.plugin;
- import org.bukkit.Bukkit;
- import org.bukkit.entity.Player;
- import org.bukkit.event.EventHandler;
- import org.bukkit.event.Listener;
- import org.bukkit.event.player.PlayerJoinEvent;
- import org.bukkit.scoreboard.DisplaySlot;
- import org.bukkit.scoreboard.Objective;
- import org.bukkit.scoreboard.Score;
- import org.bukkit.scoreboard.ScoreboardManager;
- import net.md_5.bungee.api.ChatColor;
- public class Scoreboard implements Listener {
- @EventHandler
- public void join(PlayerJoinEvent event) {
- Player player = event.getPlayer();
- ScoreboardManager m = Bukkit.getScoreboardManager();
- org.bukkit.scoreboard.Scoreboard b = m.getNewScoreboard();
- Objective o = b.registerNewObjective("Gold","");
- o.setDisplaySlot(DisplaySlot.SIDEBAR);
- o.setDisplayName(ChatColor.DARK_PURPLE + "PIXELZONE");
- Score Space5 = o.getScore(ChatColor.WHITE + " ");
- Space5.setScore(9);
- Score line5 = o.getScore(ChatColor.GRAY + "Hub ● " + ChatColor.AQUA + "%online%");
- line5.setScore(8);
- Score Space4 = o.getScore(ChatColor.WHITE + " ");
- Space4.setScore(7);
- Score line4 = o.getScore(ChatColor.GRAY + "Creative ● " + ChatColor.AQUA + "%online%");
- line4.setScore(6);
- Score Space3 = o.getScore(ChatColor.WHITE + " ");
- Space3.setScore(5);
- Score line3 = o.getScore(ChatColor.GRAY + "Factions ● " + ChatColor.AQUA + "%online%");
- line3.setScore(4);
- Score Space2 = o.getScore(ChatColor.WHITE + " ");
- Space2.setScore(3);
- Score line2 = o.getScore(ChatColor.GRAY + "Skyblock ● " + ChatColor.AQUA + "%online%");
- line2.setScore(2);
- Score Space1 = o.getScore(ChatColor.WHITE + " ");
- Space1.setScore(1);
- player.setScoreboard(b);
- }
- private Objective registerNewObjective(String string, String string2) {
- // TODO Auto-generated method stub
- return null;
- }
- }
Add Comment
Please, Sign In to add comment