1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-14 23:15:24 +02:00

minecraft: add page (#17124)

Co-authored-by: Machiavelli <145562237+MachiavelliII@users.noreply.github.com>
Co-authored-by: Wiktor Perskawiec <wiktor@perskawiec.cc>
This commit is contained in:
Managor 2025-07-05 14:38:18 +03:00 committed by GitHub
parent ae394e5a71
commit cac558ee1d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

20
pages/common/minecraft.md Normal file
View file

@ -0,0 +1,20 @@
# minecraft
> Run a headless Minecraft server.
> More information: <https://minecraft.wiki/w/Tutorial:Setting_up_a_Java_Edition_server>.
- Start a Minecraft server and generate a world if it doesn't exist:
`java -jar {{path/to/server.jar}} --nogui`
- Set the minimum and maximum amount of memory a server is allowed to have (Note: Setting them the same prevents lag caused by heap scaling):
`java -Xms{{1024M}} -Xmx{{2048M}} -jar {{path/to/server.jar}} --nogui`
- Start a server with a GUI:
`java -jar {{path/to/server.jar}}`
- Shut the server down:
`stop`