Search in sources :

Example 6 with PacketPlayOutScoreboardTeam

use of net.minecraft.server.v1_14_R1.PacketPlayOutScoreboardTeam 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_11_R1.PacketPlayOutScoreboardTeam) PacketPlayOutScoreboardTeam(net.minecraft.server.v1_11_R1.PacketPlayOutScoreboardTeam) ScoreboardTeam(net.minecraft.server.v1_11_R1.ScoreboardTeam)

Example 7 with PacketPlayOutScoreboardTeam

use of net.minecraft.server.v1_14_R1.PacketPlayOutScoreboardTeam 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.getField(team.getClass(), "team");
    }
    try {
        ScoreboardTeam nmsTeam = (ScoreboardTeam) TEAM_FIELD.get(team);
        sendPacket(recipient, new PacketPlayOutScoreboardTeam(nmsTeam, mode));
    } catch (Throwable e) {
        e.printStackTrace();
    }
}
Also used : PacketPlayOutScoreboardTeam(net.minecraft.server.v1_8_R3.PacketPlayOutScoreboardTeam) PacketPlayOutScoreboardTeam(net.minecraft.server.v1_8_R3.PacketPlayOutScoreboardTeam) ScoreboardTeam(net.minecraft.server.v1_8_R3.ScoreboardTeam)

Example 8 with PacketPlayOutScoreboardTeam

use of net.minecraft.server.v1_14_R1.PacketPlayOutScoreboardTeam 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_14_R1.PacketPlayOutScoreboardTeam) ScoreboardTeam(net.minecraft.server.v1_14_R1.ScoreboardTeam) PacketPlayOutScoreboardTeam(net.minecraft.server.v1_14_R1.PacketPlayOutScoreboardTeam)

Example 9 with PacketPlayOutScoreboardTeam

use of net.minecraft.server.v1_14_R1.PacketPlayOutScoreboardTeam 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)

Aggregations

PacketPlayOutScoreboardTeam (net.minecraft.server.v1_16_R3.PacketPlayOutScoreboardTeam)2 ScoreboardTeam (net.minecraft.server.v1_16_R3.ScoreboardTeam)2 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 PacketPlayOutScoreboardTeam (net.minecraft.server.v1_12_R1.PacketPlayOutScoreboardTeam)1 ScoreboardTeam (net.minecraft.server.v1_12_R1.ScoreboardTeam)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 ScoreboardTeam (net.minecraft.server.v1_15_R1.ScoreboardTeam)1 PacketPlayOutEntityHeadRotation (net.minecraft.server.v1_16_R3.PacketPlayOutEntityHeadRotation)1 PacketPlayOutEntityMetadata (net.minecraft.server.v1_16_R3.PacketPlayOutEntityMetadata)1 PacketPlayOutEntityTeleport (net.minecraft.server.v1_16_R3.PacketPlayOutEntityTeleport)1 PacketPlayOutNamedEntitySpawn (net.minecraft.server.v1_16_R3.PacketPlayOutNamedEntitySpawn)1 PacketPlayOutPlayerInfo (net.minecraft.server.v1_16_R3.PacketPlayOutPlayerInfo)1 PacketPlayOutScoreboardTeam (net.minecraft.server.v1_8_R3.PacketPlayOutScoreboardTeam)1