How can I prevent Minecraft from disconnecting me when I'm AFK?

On Minecraft, I have a good AFK machine set up, it's all lit up and covered so I don't die while in it. But there is a problem with it:

When I go AFK, I'd say about half of the time I come back and the screen says "Disconnected" or "Timed Out". This defeats the purpose of an AFK machine, because none of my things load whilst I'm disconnected.

I was wondering if there is a way to eliminate or at least reduce the amount of times that I get logged out while AFK?

NOTE In this situation where I go AFK I am on a multiplayer server.


Assuming you are getting kicked automatically because the server set a "Max AFK time before kick" , this should be relatively easy to solve.

Simply place a trapdoor in front of you and close/open it at the same time as you press F11.

F11 toggles fullscreen, and if you exit fullscreen while holding a key Minecraft will for some reason not detect that you released the key. So basically you're gonna be constantly opening and closing a trapdoor and therefore you will not be kicked.


Disclaimer: I made this. I'm not advertising it, I just think that it can be useful for him/her.

There is an application I released at github, which automatically clicks the button specified, preventing you from getting kicked.

http://github.com/ardaozkal/keyboardmasher/releases

how to use

Just pressing start should be enough to start avoiding afk kick.


if you hold down the right mouse button the take it out of your PC then it will keep pressing right automatically if you stand in front of a trapdoor you will not get kicked for being away