itzg / docker-minecraft-bedrock-server

Containerized Minecraft Bedrock Dedicated Server with selectable version
MIT License
1.14k stars 219 forks source link

Game will only start in survival #374

Open Phil-T1 opened 10 months ago

Phil-T1 commented 10 months ago

Hi,

It could be me as I don't know Minecraft, but it only seems to start in survival mode, where zombies attack and I take damage.

I want creative mode for my 4 year old kid. If it is me then can anybody see where I've gone wrong?

version: '3.4'

services:

  minecraft:
    image: itzg/minecraft-bedrock-server
    container_name: minecraft
    restart: unless-stopped
    environment:
      TZ: Europe/London
      VERSION: LATEST
      SERVER_NAME: Minecraft World
      EULA: "TRUE"
      GAMEMODE: creative
      DIFFICULTY: easy
    ports:
        - 19132:19132/udp
    stdin_open: true
    tty: true
    volumes:
      - ./data:/data

Thanks in advance!

Phil.

itzg commented 10 months ago

I'll have to test this out myself, but I believe some of the settings like game mode are baked into the world data until a server command is used to change that. One option to try is stopping the container, deleting the world data, and letting it regenerate with the GAMEMODE in place.

Phil-T1 commented 10 months ago

Hi Geoff,

Thanks for the speedy reply and apologies for my slow one!

Stopping the container, deleting the world file and starting it again did the job.

Thanks again, very much appreciated!

Phil.