@NonnullByDefault public class PacketScoreboard extends Object implements Scoreboard
Scoreboard using ProtocolLib.
This class as well as all returned instances are thread safe.
| Constructor and Description |
|---|
PacketScoreboard(HelperPlugin plugin) |
| Modifier and Type | Method and Description |
|---|---|
PacketScoreboardObjective |
createObjective(String id,
String title,
DisplaySlot displaySlot,
boolean autoSubscribe)
Creates a new scoreboard objective
|
PacketScoreboardObjective |
createPlayerObjective(Player player,
String id,
String title,
DisplaySlot displaySlot,
boolean autoSubscribe)
Creates a new per-player scoreboard objective
|
PacketScoreboardTeam |
createPlayerTeam(Player player,
String id,
String title,
boolean autoSubscribe)
Creates a new per-player scoreboard team
|
PacketScoreboardTeam |
createTeam(String id,
String title,
boolean autoSubscribe)
Creates a new scoreboard team
|
PacketScoreboardObjective |
getObjective(String id)
Gets an existing scoreboard objective if one with the id exists
|
PacketScoreboardObjective |
getPlayerObjective(Player player,
String id)
Gets an existing per-player scoreboard objective if one with the id exists
|
PacketScoreboardTeam |
getPlayerTeam(Player player,
String id)
Gets an existing per-player scoreboard team if one with the id exists
|
PacketScoreboardTeam |
getTeam(String id)
Gets an existing scoreboard team if one with the id exists
|
boolean |
removeObjective(String id)
Removes a scoreboard objective from this scoreboard
|
boolean |
removePlayerObjective(Player player,
String id)
Removes a per-player scoreboard objective from this scoreboard
|
boolean |
removePlayerTeam(Player player,
String id)
Removes a per-player scoreboard team from this scoreboard
|
boolean |
removeTeam(String id)
Removes a scoreboard team from this scoreboard
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateObjective, createObjective, createObjective, createPlayerObjective, createPlayerObjective, createPlayerObjective, createPlayerTeam, createPlayerTeam, createPlayerTeam, createTeam, createTeam, createTeampublic PacketScoreboard(@Nonnull HelperPlugin plugin)
public PacketScoreboardTeam createTeam(String id, String title, boolean autoSubscribe)
ScoreboardcreateTeam in interface Scoreboardid - the id of the teamtitle - the initial title for the teamautoSubscribe - if players should be automatically subscribed@Nullable public PacketScoreboardTeam getTeam(String id)
ScoreboardgetTeam in interface Scoreboardid - the id of the teampublic boolean removeTeam(String id)
ScoreboardremoveTeam in interface Scoreboardid - the id of the teampublic PacketScoreboardObjective createObjective(String id, String title, DisplaySlot displaySlot, boolean autoSubscribe)
ScoreboardcreateObjective in interface Scoreboardid - the id of the objectivetitle - the initial title for the objectivedisplaySlot - the display slot to use for this objectiveautoSubscribe - if players should be automatically subscribed@Nullable public PacketScoreboardObjective getObjective(String id)
ScoreboardgetObjective in interface Scoreboardid - the id of the objectivepublic boolean removeObjective(String id)
ScoreboardremoveObjective in interface Scoreboardid - the id of the objectivepublic PacketScoreboardTeam createPlayerTeam(Player player, String id, String title, boolean autoSubscribe)
ScoreboardcreatePlayerTeam in interface Scoreboardplayer - the player to make the team forid - the id of the teamtitle - the initial title of the teamautoSubscribe - if players should be automatically subscribed@Nullable public PacketScoreboardTeam getPlayerTeam(Player player, String id)
ScoreboardgetPlayerTeam in interface Scoreboardplayer - the player to get the team forid - the id of the teampublic boolean removePlayerTeam(Player player, String id)
ScoreboardremovePlayerTeam in interface Scoreboardplayer - the player to remove the team forid - the id of the teampublic PacketScoreboardObjective createPlayerObjective(Player player, String id, String title, DisplaySlot displaySlot, boolean autoSubscribe)
ScoreboardcreatePlayerObjective in interface Scoreboardplayer - the player to make the objective forid - the id of the objectivetitle - the initial title of the objectivedisplaySlot - the display slot to use for this objectiveautoSubscribe - if players should be automatically subscribed@Nullable public PacketScoreboardObjective getPlayerObjective(Player player, String id)
ScoreboardgetPlayerObjective in interface Scoreboardplayer - the player to get the objective forid - the id of the objectivepublic boolean removePlayerObjective(Player player, String id)
ScoreboardremovePlayerObjective in interface Scoreboardplayer - the player to remove the objective forid - the id of the objectiveCopyright © 2020. All rights reserved.