How to force Minecraft to "Play Offline"?
I've set Minecraft up with my account on a Windows guest user for my little siblings to play singleplayer. For security reasons, as well as concerns for the children themselves, I'd like to disable multiplayer on that account by forcing the "Play Offline" mode.
New versions will be added by me, manually, along with OptiFine and whatever other mods were necessary.
I'm thinking that the best way to do this would be related to destroying or invalidating the login token for that user, but how can I do this without making it re-request the password?
Best Answer
Alas, "Online mode" refers only to the account validation. You can still log into servers just fine if they don't enforce it.
What you can do, however, is simply to go to your firewall settings and disable Minecraft's traffic rules. Then it will indeed be unable to contact anything through IP.
Pictures about "How to force Minecraft to "Play Offline"?"



How to play Minecraft offline in Windows 10?
More answers regarding how to force Minecraft to "Play Offline"?
Answer 2
go to Control Panel - System and Security - windows firewall, then click advanced settings.

- Right Click on Inbound Rules

And click New Rule
You will then see the following menu, Select Port as the option and click Next

You will need to do this for both TCP & UDP and then click Specific Local Ports and change the value to 25565 (this is the default port for minecraft servers so will cover the majority of servers
Select Block the Connection

Hit Next twice and then give the rule a name (minecraft Multiplayer) and click finish. Do this twice for both TCP and UDP and they will not be able to connect to multiplayer.
To reopen this in future just delete the two rules
Alternative
The only real alternative to this is to block Java itself from connecting to the internet, this is not highly recommended due to the fact this will block all java applications from accessing the internet, but it will force play offline mode.
Yet another Alternative
Is to get parental software which can monitor and change childrens internet and application usage. The best i have found and used is Qustodio It is completely free and allows you to set time limits on the internet see game and application usage. You can also have different user accounts for each child with different privilages. this could be the best option and you can just block the internet for just them whenever you know they would be playing,
Alternatively you could block the internet perminantly and just activate it if they want to search the web etc. This gives a lot more control. The screenshot below shows how you can lock the computer from online activity and this only applies to that particular user

It may seem invasive but most of the features can be turned off and on as you require.
Answer 3
If you download the new version of Minecraft.exe or Minecraft.msi it will install a minimal working Java in the directory of the Launcher. By default, the game will prefer this to any other java installation.
This means that you can add [Minecraft]/runtime/jre-ABC/DEF/bin/javaw.exe to the block list of your firewall, instead of blocking the default port (25565).
- Open "Windows Firewall with Advanced Security" as an Administrator
- Click on "Outbound rules" in the left pane
- In the right pane, click "New rule..."
- In the wizard, set it to program and locate the
javaw.exementioned above. - Set it to "Block all connections".
- Optional: Repeat step 2-5 for
java.exe.
Blocking javaw.exe affects the game itself. Any attempt to join a server will cause a java.net.SocketException: Permission denied, even though the launcher won't say "Play Offline".
Blocking java.exe will prevent the launcher from accessing minecraft.net, so you will not be able to install new versions if you simply run Minecraft_Launcher.exe, which uses the blocked java. You can easily subvert this by running [Minecraft]/game/launcher.jar manually.
However, this is not really needed, and a simpler solution is using Windows UAC. Specifically, go to %appdata%/.minecraft. Right click on versions > Properties > Security > Edit. Select your kid's account and check "Deny" for "Write". Repeat his for launcher_profiles.json. This will prevent your kids from downloading new versions, or modifying the existing ones. Furthermore, any changes to profiles with revert once the launcher closes.
A note on security: This method only works as long as the restricted user doesn't know how to run the game using a different java installation.
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Anna Shvets, SHVETS production, cottonbro, Brett Jordan
