use of net.minecraft.server.v1_8_R2.PacketPlayOutChat in project Ublisk by Derkades.
the class V1_12_R1 method sendActionBarMessage.
@Override
public void sendActionBarMessage(Player player, String message) {
IChatBaseComponent dummyComponent = ChatSerializer.a("{\"text\":\"herobrine1337\"}");
PacketPlayOutChat packet = new PacketPlayOutChat(dummyComponent, ChatMessageType.GAME_INFO);
packet.components = new BaseComponent[] { new TextComponent(message) };
CraftPlayer craftPlayer = (CraftPlayer) player;
craftPlayer.getHandle().playerConnection.sendPacket(packet);
}
Aggregations