use of net.minecraft.network.protocol.game.PacketPlayOutChat in project SwornAPI by dmulloy2.
the class Volatile method sendMessage.
public static boolean sendMessage(Player player, ChatPosition position, BaseComponent... message) {
IChatBaseComponent component = IChatBaseComponent.ChatSerializer.a(ComponentSerializer.toString(message));
ChatMessageType type = ChatMessageType.a(position.getValue());
((org.bukkit.craftbukkit.v1_18_R2.entity.CraftPlayer) player).getHandle().b.a(new PacketPlayOutChat(component, type, SERVER_UUID));
return true;
}
Aggregations