Skip to content

Commit b8ac785

Browse files
committed
Updated with links to Bedrock Docs
1 parent 9ba0cf2 commit b8ac785

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,17 +194,22 @@ There are various tools to look XUIDs up online and they are also printed to the
194194

195195
## Variables
196196

197-
Custom server variables are passed in just like the allowlist or as a full JSON string.
197+
Custom server variables are supported by Bedrock. Details and usage instructions can be found on the official bedrock documentation, located here:
198198

199-
Server variables are parsed into their most likely type (number-like turn into numbers, all other inputs are treated as string) using jq's `fromjson` command. In the example below, `var1` is a string, `var2` is a number, and `var3` is a string.
199+
- [Variables & Secrets - Minecraft Creator Docs](https://learn.microsoft.com/en-us/minecraft/creator/documents/scriptingservers?view=minecraft-bedrock-stable#variables-and-secrets)
200+
- [Variables & Secrets - minecraft/server-admin example](https://learn.microsoft.com/en-us/minecraft/creator/scriptapi/minecraft/server-admin/serversecrets?view=minecraft-bedrock-experimental#getplayerprofilets-1)
201+
202+
Custom server variables are passed in as comma-separated simple key-value pairs or as a full JSON string.
203+
204+
Server variables are parsed into their most likely type (number-like turn into numbers, all other inputs are treated as string) using [jq's `fromjson` command](https://jqlang.github.io/jq/manual/#convert-to-from-json). In the example below, `var1` is a string, `var2` is a number, and `var3` is a string.
200205

201206
For greater control on types, users can provide a full string JSON representation that is used as-is.
202207

203-
All variables are written to the config/default/variables.json. There is no support for Module-specific variable handling at this time.
208+
All variables are written to the variables file located at `config/default/variables.json`. There is no support for Module-specific variable handling at this time.
204209

205210
```shell
206211
# passing in simple expressions
207-
-e VARIABLES="var1:customStringValue,var2:1234,var3:true"
212+
-e VARIABLES="var1=customStringValue,var2=1234,var3=true"
208213
209214
# pass in a full json object:
210215
-e VARIABLES='{"mobSpawnRate":22,"enableCheats":true,"worldArray":["My World", "Abc", 123]}'

0 commit comments

Comments
 (0)