name: minecraft
services:
  upnp:
    image: ghcr.io/vleeuwenmenno/auto-upnp:latest
    restart: unless-stopped
    network_mode: host
    environment:
      UPNP_DURATION: 86400  # 24 hours in seconds
      PORTS: |
        [
          {"port": 25565, "protocol": "tcp"},
          {"port": 25565, "protocol": "udp"},
          {"port": 24454, "protocol": "udp"},
          {"port": 3456, "protocol": "tcp"},
          {"port": 19132, "protocol": "udp"}
        ]

  paper:
    image: itzg/minecraft-server
    tty: true
    stdin_open: true
    ports:
      - "25565:25565/tcp"
      - "24454:24454/udp"
      - "19132:19132/udp"
      - "3456:8100/tcp"
    environment:
      PUID: 1000
      PGID: 1000
      EULA: "TRUE"
      TYPE: "paper"
      VERSION: 1.21.1
      DIFFICULTY: "hard"
      SERVER_NAME: "Paper Mostly Vanilla Server"
      MOTD: "Paper Server (Supports 1.20.x and newer!)"
      MEMORY: "32G"
      MAX_PLAYERS: 32
      VIEW_DISTANCE: 32
      SPAWN_MONSTERS: true
      SPAWN_ANIMALS: true
      ENFORCE_SECURE_PROFILE: false

      PLUGINS: |
        https://cdn.modrinth.com/data/Jrmoreqs/versions/Ch2Vh0XL/AdvancedBackups-spigot-1.21-3.6.3.jar
        https://cdn.modrinth.com/data/9eGKb6K1/versions/tA5pALYl/voicechat-bukkit-2.5.25.jar
        https://cdn.modrinth.com/data/eBqOQXoA/versions/ndMZChDv/RecoveryTotem-1.0.1.jar
        https://cdn.modrinth.com/data/fALzjamp/versions/ytBhnGfO/Chunky-Bukkit-1.4.28.jar
        https://cdn.modrinth.com/data/P1OZGk5p/versions/ffAFJrjN/ViaVersion-5.1.1.jar
        https://cdn.modrinth.com/data/NpvuJQoq/versions/kwAAl5BS/ViaBackwards-5.1.1.jar
        https://cdn.modrinth.com/data/wKkoqHrH/versions/ohEXB7mE/Geyser-Spigot.jar
        https://cdn.modrinth.com/data/Vebnzrzj/versions/cfNN7sys/LuckPerms-Bukkit-5.4.145.jar
        https://cdn.modrinth.com/data/swbUV1cr/versions/DB0OeC5p/bluemap-5.4-spigot.jar

      OPS: |
        StarDebris

      WHITELIST: |
        StarDebris
        Audi358
        TechnikTake
        MsPremium
        Barny_8874
        Ricky_2405
        KinderKiller3000
        ScherzkeksMiner
        PauBau
        QuickWitPhil
        Draxonix
        Zakomi
        skintsoldier122
        Krank4ever
        Benjilami
        Barny_8847
        Destination456
        xKizu

    restart: unless-stopped
    volumes:
      - /mnt/services/minecraft:/data
