Java Code Examples for org.bukkit.scoreboard.ScoreboardManager#getNewScoreboard()
The following examples show how to use
org.bukkit.scoreboard.ScoreboardManager#getNewScoreboard() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Game.java From Survival-Games with GNU General Public License v3.0 | 5 votes |
public void Scoreboard(Player player) { ScoreboardManager manager = Bukkit.getScoreboardManager(); Scoreboard board = manager.getNewScoreboard(); Objective objective = board.registerNewObjective("test", "dummy"); objective.setDisplaySlot(DisplaySlot.SIDEBAR); objective.setDisplayName("Scoreboard"); objective.getName(); Score score = objective.getScore(ChatColor.GREEN + "Kills:"); //Get a fake offline player score.setScore(1); }
Example 2
Source File: PlayerStat.java From SkyWarsReloaded with GNU General Public License v3.0 | 5 votes |
private static void getScoreboard(Player player) { Scoreboard scoreboard = scoreboards.get(player); if (scoreboard != null) { resetScoreboard(player); } ScoreboardManager manager = SkyWarsReloaded.get().getServer().getScoreboardManager(); scoreboard = manager.getNewScoreboard(); Objective objective = SkyWarsReloaded.getNMS().getNewObjective(scoreboard, "dummy", "info"); objective.setDisplaySlot(DisplaySlot.SIDEBAR); scoreboards.put(player, scoreboard); updateScoreboard(player); }
Example 3
Source File: PlayerStat.java From SkyWarsReloaded with GNU General Public License v3.0 | 5 votes |
public static void getScoreboard(Player player) { Scoreboard scoreboard = scoreboards.get(player); if (scoreboard != null) { resetScoreboard(player); } ScoreboardManager manager = SkyWarsReloaded.get().getServer().getScoreboardManager(); scoreboard = manager.getNewScoreboard(); Objective objective = scoreboard.registerNewObjective("info", "dummy"); objective.setDisplaySlot(DisplaySlot.SIDEBAR); scoreboards.put(player, scoreboard); updateScoreboard(player); }
Example 4
Source File: Core.java From skRayFall with GNU General Public License v3.0 | 5 votes |
/** * Generates a new private scoreboard for the player when they join the server if * enableFastScoreboards is set to true. * * @param evt The Player Join Event */ @EventHandler public void onJoinScoreboards(PlayerJoinEvent evt) { if (enableFastScoreboards) { Player player = evt.getPlayer(); ScoreboardManager manager = Bukkit.getScoreboardManager(); Scoreboard board = manager.getNewScoreboard(); player.setScoreboard(board); } }
Example 5
Source File: ScoreboardMatchModule.java From ProjectAres with GNU Affero General Public License v3.0 | 4 votes |
@Inject ScoreboardMatchModule(ScoreboardManager scoreboardManager, SettingCallbackManager settingCallbackManager) { this.hiddenScoreboard = scoreboardManager.getNewScoreboard(); this.settingCallbackManager = settingCallbackManager; }
Example 6
Source File: TeamManager.java From skRayFall with GNU General Public License v3.0 | 4 votes |
public TeamManager() { ScoreboardManager manager = Bukkit.getScoreboardManager(); teamBoard = manager.getNewScoreboard(); }
Example 7
Source File: Scoreboards.java From askyblock with GNU General Public License v2.0 | 4 votes |
/** * */ private Scoreboards() { ScoreboardManager manager = Bukkit.getScoreboardManager(); board = manager.getNewScoreboard(); }