use of me.jannik.rplace.scoreboard.PlayerScoreboard in project rPlace by rlqu.
the class PlacePlayer method setScoreboard.
public void setScoreboard() {
PlayerScoreboard playerScoreboard = new PlayerScoreboard(getPlace().getConfiguration().getMessage("scoreboard-title"));
setEntries(playerScoreboard);
playerScoreboard.update();
playerScoreboard.setScoreboard(getBukkitPlayer());
getPlace().getScoreboards().put(getBukkitPlayer().getName(), playerScoreboard);
}
use of me.jannik.rplace.scoreboard.PlayerScoreboard in project rPlace by rlqu.
the class PlacePlayer method updateScoreboard.
public void updateScoreboard() {
if (getPlace().getScoreboards().get(getBukkitPlayer().getName()) == null) {
setScoreboard();
}
PlayerScoreboard playerScoreboard = getPlace().getScoreboards().get(getBukkitPlayer().getName());
playerScoreboard.clearEntries();
setEntries(playerScoreboard);
playerScoreboard.setScoreboard(getBukkitPlayer());
PacketPlayOutChat packet = new PacketPlayOutChat(new ChatComponentText(getPlace().getConfiguration().getMessage("actionbar")), (byte) 2);
((CraftPlayer) getBukkitPlayer()).getHandle().playerConnection.sendPacket(packet);
}
Aggregations