use of net.minecraft.server.v1_8_R3.PacketPlayOutScoreboardObjective in project FireAPI by FireBlade-Serv.
the class FireScoreboard method getScoreboardObjective.
private PacketPlayOutScoreboardObjective getScoreboardObjective(int mode) throws IllegalArgumentException, IllegalAccessException {
PacketPlayOutScoreboardObjective pso = new PacketPlayOutScoreboardObjective();
Field name = FireReflection.getField(pso.getClass(), "a");
name.set(pso, this.p.getName());
Field display = FireReflection.getField(pso.getClass(), "b");
display.set(pso, this.title);
Field dtype = FireReflection.getField(pso.getClass(), "c");
dtype.set(pso, EnumScoreboardHealthDisplay.INTEGER);
Field smode = FireReflection.getField(pso.getClass(), "d");
smode.set(pso, mode);
return pso;
}
Aggregations