use of net.minecraft.server.v1_8_R2.PacketPlayOutTitle in project SpaciousLib by anhcraft.
the class ActionBar_1_12_R1 method send.
@Override
public void send(World world, String text) {
for (Player player : world.getPlayers()) {
PacketPlayOutTitle title = new PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction.ACTIONBAR, IChatBaseComponent.ChatSerializer.a("{\"text\": \"" + ChatColor.translateAlternateColorCodes('&', text) + "\"}"));
((CraftPlayer) player).getHandle().playerConnection.sendPacket(title);
}
}
Aggregations