当前位置: 首页>>代码示例>>Java>>正文


Java ScoreboardManager.getNewScoreboard方法代码示例

本文整理汇总了Java中org.bukkit.scoreboard.ScoreboardManager.getNewScoreboard方法的典型用法代码示例。如果您正苦于以下问题:Java ScoreboardManager.getNewScoreboard方法的具体用法?Java ScoreboardManager.getNewScoreboard怎么用?Java ScoreboardManager.getNewScoreboard使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.bukkit.scoreboard.ScoreboardManager的用法示例。


在下文中一共展示了ScoreboardManager.getNewScoreboard方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: CustomScoreboards

import org.bukkit.scoreboard.ScoreboardManager; //导入方法依赖的package包/类
public CustomScoreboards(MortuusTerraCore main) {
	this.main = main;
	ScoreboardManager manager = Bukkit.getScoreboardManager();

	pkTeamsBoard = manager.getNewScoreboard();

	pkTeamsBoard.registerNewTeam("NEUTRAL");
	pkTeamsBoard.registerNewTeam("ORANGE");
	pkTeamsBoard.registerNewTeam("RED");

	pkTeamsBoard.getTeam("NEUTRAL").setPrefix(PKStates.NEUTRAL.getColor() + "");
	pkTeamsBoard.getTeam("ORANGE").setPrefix(PKStates.ORANGE.getColor() + "");
	pkTeamsBoard.getTeam("RED").setPrefix(PKStates.RED.getColor() + "");

	for (Team team : pkTeamsBoard.getTeams()) {
		team.setOption(Option.NAME_TAG_VISIBILITY, OptionStatus.ALWAYS);
	}
}
 
开发者ID:kadeska,项目名称:MT_Core,代码行数:19,代码来源:CustomScoreboards.java

示例2: create

import org.bukkit.scoreboard.ScoreboardManager; //导入方法依赖的package包/类
public void create(){
	ScoreboardManager manager = Bukkit.getScoreboardManager();
	board = manager.getNewScoreboard();
	teamRed = board.registerNewTeam("Red");
	teamRed.setNameTagVisibility(NameTagVisibility.HIDE_FOR_OTHER_TEAMS);
	teamRed.setAllowFriendlyFire(false);
	teamGreen = board.registerNewTeam("Green");
	teamGreen.setNameTagVisibility(NameTagVisibility.HIDE_FOR_OTHER_TEAMS);
	teamGreen.setAllowFriendlyFire(false);
	objective = board.registerNewObjective("time", "dummy");
	objective.setDisplaySlot(DisplaySlot.SIDEBAR);
	objective.setDisplayName("Time");
	Score scoreRed = objective.getScore(ChatColor.RED + "Red:");
	scoreRed.setScore(Game.getGame().getCurrentArena().maxPoints);
	Score scoreGreen = objective.getScore(ChatColor.GREEN + "Green:");
	scoreGreen.setScore(Game.getGame().getCurrentArena().maxPoints);
	teamRed.setPrefix(ChatColor.RED.toString());
	teamGreen.setPrefix(ChatColor.GREEN.toString());
	teamRed.setSuffix(ChatColor.WHITE.toString());
	teamGreen.setSuffix(ChatColor.WHITE.toString());
}
 
开发者ID:letsgo00,项目名称:CubeKrowd-Icerunner,代码行数:22,代码来源:Scoreboardmanager.java

示例3: Initialize

import org.bukkit.scoreboard.ScoreboardManager; //导入方法依赖的package包/类
public Scoreboard Initialize(Player p) throws IllegalStateException, IllegalArgumentException{
	ScoreboardManager manager = Bukkit.getScoreboardManager();
	Scoreboard board = manager.getNewScoreboard();
	Objective objective = board.registerNewObjective("test", "dummy");
	objective.setDisplaySlot(DisplaySlot.SIDEBAR);
	objective.setDisplayName(ChatColor.GOLD + "" + ChatColor.BOLD + "     _Esti" + ChatColor.DARK_AQUA + "" + ChatColor.BOLD +"Net_     ");
	Score score2 = objective.getScore(ChatColor.DARK_BLUE + "Online:"); //Get a fake offline player
	score2.setScore(12);
	Score score3 = objective.getScore(ChatColor.BOLD + "" + Integer.toString(Bukkit.getServer().getOnlinePlayers().size())); //Get a fake offline player
	score3.setScore(11);
	Score score7 = objective.getScore(ChatColor.GREEN + "Time left:"); //Get a fake offline player
	score7.setScore(10);
	Score score10 = objective.getScore(ChatColor.BOLD + "" + Basic.minutes + "m " + Basic.seconds + "s"); //Get a fake offline player
	score10.setScore(9);
	Score score = objective.getScore(ChatColor.AQUA + "Kills:"); //Get a fake offline player
	score.setScore(8);
	Score score5 = objective.getScore(ChatColor.BOLD + "" + Basic.kills.get(p.getUniqueId()) + " "); //Get a fake offline player
	score5.setScore(7);
	Score score8 = objective.getScore(ChatColor.GOLD + "Deaths:");
	score8.setScore(6);
	Score score9 = objective.getScore(ChatColor.BOLD + "" + Basic.deaths.get(p.getUniqueId()) + " ");
	score9.setScore(5);
	return board;
}
 
开发者ID:EstiNet,项目名称:gFeatures,代码行数:25,代码来源:GlidersScore.java

示例4: Initialize

import org.bukkit.scoreboard.ScoreboardManager; //导入方法依赖的package包/类
public Scoreboard Initialize(Player p) throws IllegalStateException, IllegalArgumentException{
	ScoreboardManager manager = Bukkit.getScoreboardManager();
	Scoreboard board = manager.getNewScoreboard();
	Objective objective = board.registerNewObjective("test", "dummy");
	objective.setDisplaySlot(DisplaySlot.SIDEBAR);
	objective.setDisplayName(ChatColor.GOLD + "" + ChatColor.BOLD + "     _Esti" + ChatColor.DARK_AQUA + "" + ChatColor.BOLD +"Net_     ");
	Score score2 = objective.getScore(ChatColor.DARK_BLUE + "Online:"); //Get a fake offline player
	score2.setScore(4);
	Score score3 = objective.getScore(ChatColor.BOLD + "" + Integer.toString(Bukkit.getServer().getOnlinePlayers().size())); //Get a fake offline player
	score3.setScore(3);
	Score score = objective.getScore(ChatColor.AQUA + "Time before game starts:"); //Get a fake offline player
	score.setScore(2);
	Score score5 = objective.getScore(ChatColor.BOLD + "" + Basic.countdown + " "); //Get a fake offline player
	score5.setScore(1);
	return board;
}
 
开发者ID:EstiNet,项目名称:gFeatures,代码行数:17,代码来源:Lobby.java

示例5: setBountyBoard

import org.bukkit.scoreboard.ScoreboardManager; //导入方法依赖的package包/类
public void setBountyBoard(Player player, Player contractor, Reward reward)
{
    ScoreboardManager mang = Bukkit.getScoreboardManager();
    Scoreboard board = mang.getNewScoreboard();

    Objective objective = board.registerNewObjective("Stats", "dummy");

    objective.setDisplaySlot(DisplaySlot.SIDEBAR);
    objective.setDisplayName(ChatColor.BLUE +  "Bounty");

    Score bounty = objective.getScore(Bukkit.getOfflinePlayer("Bounty For You"));
    Score cont = objective.getScore(Bukkit.getOfflinePlayer("From: " + contractor.getPlayerListName())); //might be too long
    Score value = objective.getScore(Bukkit.getOfflinePlayer("Reward: " + reward.getItem()));

    bounty.setScore(1 + reward.getAmount());
    cont.setScore(1);
    value.setScore(reward.getAmount());

    player.setScoreboard(board);
    scoreTimer(player);
}
 
开发者ID:tritania,项目名称:Pugna,代码行数:22,代码来源:Stats.java

示例6: setPlayerBoard

import org.bukkit.scoreboard.ScoreboardManager; //导入方法依赖的package包/类
public void setPlayerBoard(Player player)
{
    ScoreboardManager mang = Bukkit.getScoreboardManager();
    Scoreboard board = mang.getNewScoreboard();

    Objective objective = board.registerNewObjective("Stats", "dummy");

    objective.setDisplaySlot(DisplaySlot.SIDEBAR);
    objective.setDisplayName(ChatColor.BLUE +  "Your Stats");

    Score score = objective.getScore(Bukkit.getOfflinePlayer("Score: "));
    Score kills = objective.getScore(Bukkit.getOfflinePlayer("Kills: " ));
    Score deaths = objective.getScore(Bukkit.getOfflinePlayer("Deaths: " ));
    Score teamRank = objective.getScore(Bukkit.getOfflinePlayer("Team Rank: "));

    PugnaPlayer play = pg.track.getPlayerData(player);
    PugnaScore values = play.getScore();

    score.setScore(values.getTotalScore());
    kills.setScore(values.getKills());
    deaths.setScore(values.getDeaths());

    player.setScoreboard(board);
    scoreTimer(player);
}
 
开发者ID:tritania,项目名称:Pugna,代码行数:26,代码来源:Stats.java

示例7: getScoreBoard

import org.bukkit.scoreboard.ScoreboardManager; //导入方法依赖的package包/类
private void getScoreBoard() {
	if (scoreboard != null) {
           resetScoreboard();
       }
	ScoreboardManager manager = SkyWarsReloaded.get().getServer().getScoreboardManager();
	scoreboard = manager.getNewScoreboard();
       objective = scoreboard.registerNewObjective("info", "dummy");
       objective.setDisplaySlot(DisplaySlot.SIDEBAR);
       String leaderboard = new Messaging.MessageFormatter().setVariable("mapname", mapName.toUpperCase()).format("game.scoreboard-title");
       objective.setDisplayName(leaderboard);
}
 
开发者ID:smessie,项目名称:SkyWarsReloaded,代码行数:12,代码来源:Game.java

示例8: onEnable

import org.bukkit.scoreboard.ScoreboardManager; //导入方法依赖的package包/类
public void onEnable() {

    ScoreboardManager manager = Bukkit.getScoreboardManager();
    board = manager.getNewScoreboard();

    final Objective objective = board.registerNewObjective("test1", "teste2");
    objective.setDisplayName("");
    objective.setDisplaySlot(DisplaySlot.SIDEBAR);

    gue = board.registerNewTeam("gue");
    gue.setPrefix(ChatColor.DARK_AQUA + "[Guerreiro] " + ChatColor.RESET);

    Main.instance = this;
    data.setup(this);
    saveDefaultConfig();
    Hooks.hookEconomy();
    Hooks.hookChat();
    Hooks.hookSimpleClans();
    Utils.scoreBoard();
    Utils.atualizarTag();

    if (Bukkit.getPluginManager().getPlugin("Legendchat") == null) {
      getServer().getConsoleSender().sendMessage("§4[LsGuerreiro] §cLegendChat nao encontrado, tag desativada.");
    }

    getServer().getConsoleSender().sendMessage("§3[LsGuerreiro]§b Plugin habilitado com sucesso.");
    getServer().getConsoleSender().sendMessage("§3[LsGuerreiro]§b Plugin criado por DevLeeo!");
    getServer().getConsoleSender().sendMessage("§3[LsGuerreiro]§b Versao: " + getDescription().getVersion());

    getCommand("guerreiro").setExecutor(new Comandos());
    getServer().getPluginManager().registerEvents(new Eventos(), this);
  }
 
开发者ID:leonardosnt,项目名称:OldBukkit,代码行数:33,代码来源:Main.java

示例9: getScore

import org.bukkit.scoreboard.ScoreboardManager; //导入方法依赖的package包/类
public static Scoreboard getScore(Player p) throws IllegalStateException, IllegalArgumentException{
	ScoreboardManager manager = Bukkit.getScoreboardManager();
	Scoreboard board = manager.getNewScoreboard();
	Objective objective = board.registerNewObjective("test", "dummy");
	objective.setDisplaySlot(DisplaySlot.SIDEBAR);
	objective.setDisplayName(ChatColor.GOLD + "" + ChatColor.BOLD + "     Esti" + ChatColor.DARK_AQUA + "" + ChatColor.BOLD +"Net     ");
	Score score1 = objective.getScore("");
	score1.setScore(11);
	Score score2 = objective.getScore(ChatColor.DARK_AQUA + "" + ChatColor.BOLD + "Online");
	score2.setScore(10);
	Score score3 = objective.getScore(ChatColor.GRAY + "" + ServerQuery.getPlayerCount());
	score3.setScore(9);
	Score score12 = objective.getScore(" ");
	score12.setScore(8);
	Score score = objective.getScore(ChatColor.GOLD + "" + ChatColor.BOLD + "Coins ⛀⛁⛃⛂");
	score.setScore(7);
	Score score5 = objective.getScore(ChatColor.GRAY + "" + EstiCoins.getMoney(p));
	score5.setScore(6);
	Score score11 = objective.getScore("  ");
	score11.setScore(5);
	Score score8 = objective.getScore(ChatColor.DARK_PURPLE + "" + ChatColor.BOLD + "Random Word");
	score8.setScore(4);
	String[] str = {"Awesome!", "Epic!", "Amazing!", "Cool!", "I caz spll", "Dude!", "EstiNet!", "Hi!", "Different!", "Oink." , "Beep!", "Welcome!", "Yo.", "LOL!", "wut", "Play!", "toes"};
	Score score9 = objective.getScore(ChatColor.GRAY + str[(int) Math.floor(Math.random() * 17)]);
	score9.setScore(3);
	Score score100 = objective.getScore("   ");
	score100.setScore(2);
	if(!(p.getName().length() >= 16)){
		Score score10 = objective.getScore(ChatColor.DARK_AQUA + p.getName().trim());
		score10.setScore(1);
	}
	return board;
}
 
开发者ID:EstiNet,项目名称:gFeatures,代码行数:34,代码来源:Scored.java

示例10: getScoreboard

import org.bukkit.scoreboard.ScoreboardManager; //导入方法依赖的package包/类
public static Scoreboard getScoreboard(int seconds){
	ScoreboardManager manager = Bukkit.getScoreboardManager();
	Scoreboard board = manager.getNewScoreboard();
	Objective objective = board.registerNewObjective("test", "dummy");
	objective.setDisplaySlot(DisplaySlot.SIDEBAR);
	objective.setDisplayName(ChatColor.GRAY + "(⌐■_■) Time Left: " + ChatColor.DARK_AQUA + seconds);
	Object[] doo = ParkourRace.distances.keySet().toArray();
	Arrays.sort(doo);
	for(int i = 0; i < doo.length; i++){
		Score score = objective.getScore(Bukkit.getPlayer(ParkourRace.distances.get(doo[i])).getName());
		score.setScore((int) (double) doo[i]);
	}
	return board;
}
 
开发者ID:EstiNet,项目名称:gFeatures,代码行数:15,代码来源:ScoreboardCreator.java

示例11: getScoreboard

import org.bukkit.scoreboard.ScoreboardManager; //导入方法依赖的package包/类
public static Scoreboard getScoreboard(int seconds){
	ScoreboardManager manager = Bukkit.getScoreboardManager();
	Scoreboard board = manager.getNewScoreboard();
	Objective objective = board.registerNewObjective("test", "dummy");
	objective.setDisplaySlot(DisplaySlot.SIDEBAR);
	objective.setDisplayName(ChatColor.GRAY + "(⌐■_■) Time Left: " + ChatColor.DARK_AQUA + seconds);
	Score score = objective.getScore("Players left: " + Spleef.stillIn.size());
	score.setScore(1);
	return board;
}
 
开发者ID:EstiNet,项目名称:gFeatures,代码行数:11,代码来源:ScoreboardCreator.java

示例12: get

import org.bukkit.scoreboard.ScoreboardManager; //导入方法依赖的package包/类
public Scoreboard get(Player p, int count) throws IllegalStateException, IllegalArgumentException{
	ScoreboardManager manager = Bukkit.getScoreboardManager();
	Scoreboard board = manager.getNewScoreboard();
	Objective objective = board.registerNewObjective("test", "dummy");
	objective.setDisplaySlot(DisplaySlot.SIDEBAR);
	objective.setDisplayName("[" + ChatColor.GREEN + "" + ChatColor.BOLD + "Grasslands" + ChatColor.RESET +"]");
	Score score1 = objective.getScore(""); //Get a fake offline player
	score1.setScore(10);
	Score score2 = objective.getScore(ChatColor.DARK_BLUE + "" + ChatColor.BOLD + "Online:"); //Get a fake offline player
	score2.setScore(9);
	Score score3 = objective.getScore("" + Integer.toString(Bukkit.getServer().getOnlinePlayers().size())); //Get a fake offline player
	score3.setScore(8);
	Score score11 = objective.getScore(""); //Get a fake offline player
	score11.setScore(7);
	Score score = objective.getScore(ChatColor.GREEN + "Clupic:"); //Get a fake offline player
	score.setScore(6);
	Score score5 = objective.getScore("" + Double.toString(EstiCoins.getMoney(p))); //Get a fake offline player
	score5.setScore(5);
	Score score12 = objective.getScore(""); //Get a fake offline player
	score12.setScore(4);
	Score score8 = objective.getScore(ChatColor.GOLD + "" + ChatColor.BOLD +  "Countdown:");
	score8.setScore(3);
	Score score9 = objective.getScore("" + count);
	score9.setScore(2);
	if(!(p.getName().length() >= 16)){
	Score score10 = objective.getScore(ChatColor.DARK_AQUA + p.getName().trim());
	score10.setScore(1);
	}
	return board;
}
 
开发者ID:EstiNet,项目名称:gFeatures,代码行数:31,代码来源:Countdown.java

示例13: createLobbyBoard

import org.bukkit.scoreboard.ScoreboardManager; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
public static void createLobbyBoard(Player p){
	  ScoreboardManager manager = Bukkit.getScoreboardManager();
	  Scoreboard board = manager.getNewScoreboard();
	   
	  Objective objective = board.registerNewObjective("LobbyBoard", "dummy");
	   
	  objective.setDisplaySlot(DisplaySlot.SIDEBAR);
	  objective.setDisplayName("§4§lYour Scores");
	   
	  Score Level = objective.getScore(Bukkit.getOfflinePlayer("§b§lLevel:"));
	  Score Credits = objective.getScore(Bukkit.getOfflinePlayer("§b§lCredits:"));
	  Score LobbyKills = objective.getScore(Bukkit.getOfflinePlayer("§b§lKills:"));
	  Score LobbyDeaths = objective.getScore(Bukkit.getOfflinePlayer("§b§lDeaths:"));
	  Score highestKS = objective.getScore(Bukkit.getOfflinePlayer("§bhes§lHigest Kill Streak:"));
	   
	  Level.setScore(1);
	  Credits.setScore(0);
	  LobbyKills.setScore(0);
	  LobbyDeaths.setScore(0);
	  highestKS.setScore(0);
	   
	  if (LobbyLevelScore.get(p.getName()) == null) LobbyLevelScore.put(p.getName(), Level);
	  if (LobbyCreditsScore.get(p.getName()) == null) LobbyCreditsScore.put(p.getName(), Credits);
	  if (LobbyKillsScore.get(p.getName()) == null) LobbyKillsScore.put(p.getName(), LobbyKills);
	  if (LobbyDeathsScore.get(p.getName()) == null) LobbyDeathsScore.put(p.getName(), LobbyDeaths);
	  if (highestKillstreak.get(p.getName()) == null) highestKillstreak.put(p.getName(), highestKS);
	   
	  if (LobbyScoreboard.get(p.getName()) == null) LobbyScoreboard.put(p.getName(), board);
	  
  }
 
开发者ID:frostythedev,项目名称:COD-Warfare,代码行数:32,代码来源:Main.java

示例14: GameManager

import org.bukkit.scoreboard.ScoreboardManager; //导入方法依赖的package包/类
public GameManager(SurvivalGames plugin) {
    this.plugin = plugin;
    this.arenaMan = plugin.getArenaManager();
    this.statMan = plugin.getStatManager();
    taskMan = plugin.getTaskManager();
    tributes = new ArrayList<String>();
    vanished = new ArrayList<Player>();
    killedPlayers = new ArrayList<String>();
    spectators = new ArrayList<String>();
    damagecause = new HashMap<String, PlayerDamage>();
    spectatorWatching = new HashMap<String, Integer>();
    grace = new ArrayList<String>();
    playerGames = new HashMap<String, Integer>();
    
    nextGame = System.currentTimeMillis() + (arenaMan.getLobby().gameTime * 1000);
    
    name = plugin.getServer().getClass().getPackage().getName();
    version = name.substring(name.lastIndexOf('.') + 1);
    
    schedulePeriodTasks();
    
    if(plugin.getSettings().enableScoreboard) {
        ScoreboardManager boardManager = plugin.getServer().getScoreboardManager();

        lobbyScoreboard = boardManager.getNewScoreboard();
        lobbyScoreboard.registerNewObjective("lobby", "dummy");

        gameScoreboard = boardManager.getNewScoreboard();
        gameScoreboard.registerNewObjective("game", "dummy");
        gameScoreboard.registerNewObjective("bounty", "dummy");

        if(!arenaMan.arenaOrder.isEmpty())
            updateScoreBoards();
    }
}
 
开发者ID:ModernDayPlayer,项目名称:SurvivalGamesX,代码行数:36,代码来源:GameManager.java

示例15: NewStats

import org.bukkit.scoreboard.ScoreboardManager; //导入方法依赖的package包/类
public static void NewStats(Player p) throws Exception{
 p.getScoreboard().clearSlot(DisplaySlot.SIDEBAR);
  ScoreboardManager manager = Bukkit.getScoreboardManager();
	Scoreboard  board = manager.getNewScoreboard();
	Objective objective = board.registerNewObjective("Statystyki","dummy");
	objective.setDisplayName("Info");
	objective.setDisplaySlot(DisplaySlot.SIDEBAR);
	Score score = objective.getScore(Bukkit.getOfflinePlayer("§6Naboje"));
	score.setScore(2000);
	p.setScoreboard(board);
}
 
开发者ID:grzegorz2047,项目名称:AceOfSpadesMiniGame,代码行数:12,代码来源:PlayersStatsboard.java


注:本文中的org.bukkit.scoreboard.ScoreboardManager.getNewScoreboard方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。