Solved TextComponent HoverEvent Error

Discussion in 'BungeeCord Plugin Development' started by illuminator3, Mar 5, 2020.

  1. So basically, my problem is if you hover on the component at the bottom you'll see the hover message from the component at the top.

    [​IMG]

    Code (Java):
        @Override
        void execute(CommandSender sender, String[] args)
        {
            def manager = ProxyServer.getInstance().getPluginManager()
            def plugins = manager.getPlugins()
            def baseComp = new TextComponent("Plugins (" + plugins.size() + "): ")

            plugins.each { plugin ->
                def description = plugin.getDescription()
                def comp = new TextComponent("§a" + description.getName())

                comp.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new TextComponent(
                    "§7Name§8: §e" + description.getName()
                            + "\n" +
                    "§7Version§8: §e" + description.getVersion()
                            + "\n" +
                    "§7Author§8: §e" + description.getAuthor()
                            + "\n" +
                    "§7Description§8: §e" + description.getDescription()
                            + "\n" +
                    "§7Main§8: §e" + description.getMain()
                )))

                if (plugins.size() - 1) comp.addExtra("§r, ")

                baseComp.addExtra(comp)
            }

            sender.sendMessage(baseComp)
        }
     
  2. Did you try it with default minecraft font?
     
  3. Now it's working. Going to report that to badlion.
     
  4. Don't forget to mark your thread as solved if you found out what is wrong.