# Minecraft

<p class="callout warning">Beachtet, dass Minecraft Version 1.12.2 openjdk 8 benötigt und neuere Versionen die v11!</p>

<p class="callout info">Installation von openjdk 8 in Debian Buster siehe: [https://book.frzn.io/books/linux/page/java---openjdk](https://book.frzn.io/books/linux/page/java---openjdk)</p>

## Download Server

Quelle: [https://mcversions.net/](https://mcversions.net/)

## Installation

[https://www.linode.com/docs/game-servers/how-to-set-up-minecraft-server-on-ubuntu-or-debian/](https://www.linode.com/docs/game-servers/how-to-set-up-minecraft-server-on-ubuntu-or-debian/)

[https://minecraft.gamepedia.com/Tutorials/Setting\_up\_a\_server#On\_macOS.2C\_Linux.2C\_and\_FreeBSD](https://minecraft.gamepedia.com/Tutorials/Setting_up_a_server#On_macOS.2C_Linux.2C_and_FreeBSD)

## Server Einstellungen (server.properties)

[https://minecraft.gamepedia.com/Server.properties](https://minecraft.gamepedia.com/Server.properties)

## Startup Script (veraltet)

[https://minecraft.gamepedia.com/Tutorials/Server\_startup\_script](https://minecraft.gamepedia.com/Tutorials/Server_startup_script)

/etc/init.d/\[SERVERNAME\]

[https://minecraft.gamepedia.com/Tutorials/Server\_startup\_script#Init.d\_Script](https://minecraft.gamepedia.com/Tutorials/Server_startup_script#Init.d_Script)

[https://forum.ubuntuusers.de/topic/autostart-minecraft-server/](https://forum.ubuntuusers.de/topic/autostart-minecraft-server/)

## Server Manager

### MSM

[https://msmhq.com/](https://msmhq.com/)

[https://github.com/msmhq/msm](https://github.com/msmhq/msm)

## Minecraft mit Mods - Forge

### Download

[http://files.minecraftforge.net/](http://files.minecraftforge.net/)

### Installation

```
java -jar forge-1.12.2-14.23.5.2854-installer.jar --installServer
```

### MSM für Forge

- neue jargroup für forge erstellen -&gt; z.b. forgecraft: `msm jargroup create forgecraft forgecraft`
- neuen Server erstellen -&gt; `msm server create mcserver01-a`
- neuen Server die jarfiles zuweisen der neuen jargroup -&gt; `msm mcserver01-a jar forgecraft minecraft_server.1.12.2.jar`
    - Hierbei unbedingt darauf achten die minecraft\_server.VERSION.jar zu verwenden und nicht die forge\*.jar Datei! 
        - Ansonsten startet der Server nicht!
- Unbedingt nochmal die Rechte der Ordner und Dateien korrigieren 
    - `chown -R minecraft:minecraft /opt/msm/servers/`
    - `chown -R minecraft:minecraft /opt/msm/jars/`
- Danach kann der neue Server "mcserver01-a" gestartet werden -&gt; `msm mcserver01-a start`

### Mods installieren

Hierfür einfach alle Mod Dateien (\*.jar) in einen Unterordner "mods" im Serververzeichnis ablegen und den Server neustarten.

## Player ID aus Mojang.com DB auslesen

[https://api.mojang.com/users/profiles/minecraft/Darkentik](https://api.mojang.com/users/profiles/minecraft/Darkentik)

## Befehle - im Spiel

##### Kreativmodus aktivieren

/gamemode 1

##### Block/Gegenstand einem Spieler hinzufügen

/give SPIELERNAME minecraft:BLOCK-NAME Menge Variation

Beispiel 64x Holzbretter Pirke ([https://www.minecraftinfo.com/woodenplankbirch.htm](https://www.minecraftinfo.com/woodenplankbirch.htm)):

/give David minecraft:planks 64 2