use of net.minecraft.server.v1_16_R3.ScoreboardTeam in project Citizens2 by CitizensDev.
the class NMSImpl method sendTeamPacket.
@Override
public void sendTeamPacket(Player recipient, Team team, int mode) {
Preconditions.checkNotNull(recipient);
Preconditions.checkNotNull(team);
if (TEAM_FIELD == null) {
TEAM_FIELD = NMS.getGetter(team.getClass(), "team");
}
try {
ScoreboardTeam nmsTeam = (ScoreboardTeam) TEAM_FIELD.invoke(team);
sendPacket(recipient, new PacketPlayOutScoreboardTeam(nmsTeam, mode));
} catch (Throwable e) {
e.printStackTrace();
}
}
use of net.minecraft.server.v1_16_R3.ScoreboardTeam in project PaperDev by Kamillaova.
the class CraftScoreboard method getEntryTeam.
public Team getEntryTeam(String entry) throws IllegalArgumentException {
Validate.notNull(entry, "Entry cannot be null");
ScoreboardTeam team = board.getPlayerTeam(entry);
return team == null ? null : new CraftTeam(this, team);
}
use of net.minecraft.server.v1_16_R3.ScoreboardTeam in project PaperDev by Kamillaova.
the class CraftScoreboard method getPlayerTeam.
public Team getPlayerTeam(OfflinePlayer player) throws IllegalArgumentException {
Validate.notNull(player, "OfflinePlayer cannot be null");
ScoreboardTeam team = board.getPlayerTeam(player.getName());
return team == null ? null : new CraftTeam(this, team);
}
use of net.minecraft.server.v1_16_R3.ScoreboardTeam in project PaperDev by Kamillaova.
the class CraftScoreboard method getTeam.
public Team getTeam(String teamName) throws IllegalArgumentException {
Validate.notNull(teamName, "Team name cannot be null");
ScoreboardTeam team = board.getTeam(teamName);
return team == null ? null : new CraftTeam(this, team);
}
Aggregations