use of net.minecraft.server.v1_15_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();
}
}
use of net.minecraft.server.v1_15_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();
}
}
use of net.minecraft.server.v1_15_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();
}
}
use of net.minecraft.server.v1_15_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();
}
}
Aggregations