Vinetos

[Packets Bukkit] Send message (JSON)

Sep 5th, 2015
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. PlayerConnection connection = ((CraftPlayer)p).getHandle().playerConnection;
  2. IChatBaseComponent oui = IChatBaseComponent.ChatSerializer.a("{\"text\":\"Oui\",\"clickEvent\":{\"action\":\"suggest_command\",\"value\":\"/une commande\"}}");
  3. PacketPlayOutChat packetTchat = new PacketPlayOutChat(oui);
  4. connection.sendPacket(packetTchat);
Advertisement
Add Comment
Please, Sign In to add comment