bungeecord JSON message doesnt work

Discussion in 'BungeeCord Plugin Development' started by Yolo_Always_4_7, Mar 18, 2020.

  1. this is the code I have and it does send the message but it is prints it like
    {text:"[x]",:hoverEvent:{true,"click me to Close"}....

    what I can do to fix it?

    Code (Text):
    TextComponent x = new TextComponent(ChatColor.GRAY + "[X]");
    x.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder(ChatColor.AQUA + "click me to close").create()));
    x.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/command"));

    t.sendMessage(new TextComponent(x));
    # t is ProxiedPlayer