Search in sources :

Example 11 with ScoreboardTeam

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();
    }
}
Also used : PacketPlayOutScoreboardTeam(net.minecraft.server.v1_13_R2.PacketPlayOutScoreboardTeam) ScoreboardTeam(net.minecraft.server.v1_13_R2.ScoreboardTeam) PacketPlayOutScoreboardTeam(net.minecraft.server.v1_13_R2.PacketPlayOutScoreboardTeam)

Example 12 with ScoreboardTeam

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);
}
Also used : ScoreboardTeam(net.minecraft.server.v1_12_R1.ScoreboardTeam)

Example 13 with ScoreboardTeam

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);
}
Also used : ScoreboardTeam(net.minecraft.server.v1_12_R1.ScoreboardTeam)

Example 14 with ScoreboardTeam

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);
}
Also used : ScoreboardTeam(net.minecraft.server.v1_12_R1.ScoreboardTeam)

Aggregations

ScoreboardTeam (net.minecraft.server.v1_12_R1.ScoreboardTeam)5 PacketPlayOutScoreboardTeam (net.minecraft.server.v1_12_R1.PacketPlayOutScoreboardTeam)2 PacketPlayOutScoreboardTeam (net.minecraft.server.v1_16_R3.PacketPlayOutScoreboardTeam)2 ScoreboardTeam (net.minecraft.server.v1_16_R3.ScoreboardTeam)2 PacketPlayOutScoreboardTeam (net.minecraft.server.v1_8_R3.PacketPlayOutScoreboardTeam)2 ScoreboardTeam (net.minecraft.server.v1_8_R3.ScoreboardTeam)2 HashSet (java.util.HashSet)1 PacketPlayOutScoreboardTeam (net.minecraft.server.v1_10_R1.PacketPlayOutScoreboardTeam)1 ScoreboardTeam (net.minecraft.server.v1_10_R1.ScoreboardTeam)1 PacketPlayOutScoreboardTeam (net.minecraft.server.v1_11_R1.PacketPlayOutScoreboardTeam)1 ScoreboardTeam (net.minecraft.server.v1_11_R1.ScoreboardTeam)1 EntityPlayer (net.minecraft.server.v1_12_R1.EntityPlayer)1 PacketPlayOutScoreboardObjective (net.minecraft.server.v1_12_R1.PacketPlayOutScoreboardObjective)1 Scoreboard (net.minecraft.server.v1_12_R1.Scoreboard)1 ScoreboardObjective (net.minecraft.server.v1_12_R1.ScoreboardObjective)1 PacketPlayOutScoreboardTeam (net.minecraft.server.v1_13_R2.PacketPlayOutScoreboardTeam)1 ScoreboardTeam (net.minecraft.server.v1_13_R2.ScoreboardTeam)1 PacketPlayOutScoreboardTeam (net.minecraft.server.v1_14_R1.PacketPlayOutScoreboardTeam)1 ScoreboardTeam (net.minecraft.server.v1_14_R1.ScoreboardTeam)1 PacketPlayOutScoreboardTeam (net.minecraft.server.v1_15_R1.PacketPlayOutScoreboardTeam)1