1

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?

  • 3
    Isn't it possible that you just disconnect from the internet? – Gerret Aug 16 '14 at 15:20
  • 2
    I just found this: "You can also consider blocking everything heading to 23.21.227.220. That's minecraft.net's web server, and also the login server. If the game client can't connect to that page, it cannot login. If they cannot login, they cannot connect to normal multiplayer servers." I haven't confirmed it yet though, but you could try that. – MrLemon Aug 18 '14 at 8:27
  • @MrLemon Can that be done on a per-user basis? (Windows XP) – JamesTheAwesomeDude Aug 18 '14 at 12:11
  • 1
    @JamesTheAwesomeDude I don't know about Win XP, and I can't seem to find a way to do it per user in Win 7 using the default firewall. What you can try is make a batch-file with route add 23.21.227.220 127.0.0.1 -p, followed by running Minecraft, followed by route delete 23.21.227.220, and link that for your kids. This assumes them not willing and able to tamper with it, though. It's also an ugly hack, rather than a real solution, and the command prompt will stay open until they close Minecraft. – MrLemon Aug 18 '14 at 14:24
  • @JamesTheAwesomeDude I think Gerret's suggestion is good. – 54D Jan 9 '15 at 13:06
3

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.

  • I tried disabling Any Computer access for the copy of Minecraft.exe owned by the little people, but that didn't work since Java is what's actually running. – JamesTheAwesomeDude Aug 16 '14 at 15:05
  • There seems to be a way to abuse program look-up : copy java.exe to Minecraft.exe's path, and you'd be able to set its permissions independently from the original java.exe. – Quentin Aug 16 '14 at 15:20
  • One other solution is to do port blocking. Blocking port 25565 should block most of the servers except those that runs on different ports. – DarkDestry Aug 17 '14 at 19:42
2

go to Control Panel - System and Security - windows firewall, then click advanced settings. enter image description here

  • Right Click on Inbound Rules

enter image description here

  • And click New Rule

  • You will then see the following menu, Select Port as the option and click Next

enter image description here

  • 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

enter image description here

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

enter image description here

It may seem invasive but most of the features can be turned off and on as you require.

  • Check my edit, i have added a more controlled alternative – Flaunting Aug 19 '14 at 12:16
1

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).

  1. Open "Windows Firewall with Advanced Security" as an Administrator
  2. Click on "Outbound rules" in the left pane
  3. In the right pane, click "New rule..."
  4. In the wizard, set it to program and locate the javaw.exe mentioned above.
  5. Set it to "Block all connections".
  6. 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.

protected by Frank Apr 29 '15 at 23:35

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.