RCON commands feature (#1391)

Co-authored-by: christopher blodgett <christopher.blodgett@gmail.com>
This commit is contained in:
chblodg
2022-03-02 09:29:12 -08:00
committed by GitHub
parent 15869fd774
commit 4587b32480
8 changed files with 197 additions and 3 deletions

View File

@@ -0,0 +1,24 @@
version: '3'
services:
minecraft:
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
ports:
- "25565:25565"
volumes:
- "mc:/data"
environment:
EULA: "TRUE"
# YAML Heredoc, be sure to use '|-' this will remove the first newline and final new line.
# This is versus '|' that will leaving with two empty strings at top and bottom.
RCON_CMDS_STARTUP: |-
/gamerule doFireTick false
/team add New
/team add Old
RCON_CMDS_ON_CONNECT: |-
/team join New @a[team=]
/give @a[team=New] diamond_block
/team join Old @a[team=New]
restart: unless-stopped
volumes:
mc: {}