I would like to know if there's a (Java) API with which you can program a bot (that behaves like a gamer), because I find it interesting when you then see how your own bot behaves. I already have 2 years of Java experience. The bot should be able to join a server and be programmed in such a way that you can tell the bot to follow you, for example with .follow. Unfortunately, I haven't found anything about it on the Internet.
https://github.com/...mineflayer
Requires your own MC account if you want to be on a non-cracked server. In addition, the larger server will probably be banned directly.
Otherwise you would have to do it as a mod / plugin for the server. Then of course you can only do it on your server, but you don't need your own account.