You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-12Lines changed: 14 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1562,48 +1562,50 @@ To also include the timestamp with each log, set `LOG_TIMESTAMP` to "true". The
1562
1562
[init] 2022-02-05 16:58:33+00:00 Starting the Minecraft server...
1563
1563
```
1564
1564
1565
-
### Use RCON commands
1565
+
### Auto-execute RCON commands
1566
1566
1567
-
Feature is used run commands when the server starts, client connects, or client disconnects.
1568
-
**Notes:**
1569
-
* On client connect we only know there was a connection, and not who connected. RCON commands will need to be used for that.
1570
-
* Using '|-' is preferred for yaml, this make sure only the correct new lines are in place for the commands.
1567
+
RCON commands can be configured to execute when the server starts, a client connects, or a client disconnects.
1568
+
1569
+
> When declaring several commands within a compose file environment variable, it's easiest to use YAML's `|-` [block style indicator](https://yaml-multiline.info/).
1571
1570
1572
1571
**On Server Start:**
1573
1572
1574
1573
```yaml
1575
1574
RCON_CMDS_STARTUP: |-
1576
-
/gamerule doFireTick false
1577
-
/pregen start 200
1575
+
gamerule doFireTick false
1576
+
pregen start 200
1578
1577
```
1579
1578
1580
1579
**On Client Connection:**
1581
1580
1582
1581
```yaml
1583
1582
RCON_CMDS_ON_CONNECT: |-
1584
-
/team join New @a[team=]
1583
+
team join New @a[team=]
1585
1584
```
1586
1585
1586
+
**Note:**
1587
+
* On client connect we only know there was a connection, and not who connected. RCON commands will need to be used for that.
0 commit comments