Adding command regex patterns

This commit is contained in:
DaanV2
2021-04-13 16:50:12 +02:00
parent c544b036f8
commit a7fbac446a
2 changed files with 18 additions and 2 deletions

View File

@@ -33,7 +33,15 @@
"pre_effect_script": { "type": "string", "description": "A molang script that will be run when the particle emitter is initialized" } "pre_effect_script": { "type": "string", "description": "A molang script that will be run when the particle emitter is initialized" }
} }
}, },
"commands": { "type": "string", "description": "The event or commands to execute" } "commands": {
"type": "string",
"description": "The event or commands to execute",
"anyOf": [
{ "pattern": "^.*=.*;$", "title": "Variable" },
{ "pattern": "^/[a-z].*$", "title": "Minecraft command" },
{ "pattern": "[A-Za-z][a-z]*\\.[a-z_0-9]*", "title": "Molang" }
]
}
}, },
"properties": { "properties": {
"format_version": { "format_version": {

View File

@@ -29,7 +29,15 @@
"pre_effect_script": { "type": "string", "description": "A molang script that will be run when the particle emitter is initialized" } "pre_effect_script": { "type": "string", "description": "A molang script that will be run when the particle emitter is initialized" }
} }
}, },
"commands": { "type": "string", "description": "The event or commands to execute" } "commands": {
"type": "string",
"description": "The event or commands to execute",
"anyOf": [
{ "pattern": "^.*=.*;$", "title": "Variable" },
{ "pattern": "^/[a-z].*$", "title": "Minecraft command" },
{ "pattern": "[A-Za-z][a-z]*\\.[a-z_0-9]*", "title": "Molang" }
]
}
}, },
"type": "object", "type": "object",
"title": "Animation 1.8.0", "title": "Animation 1.8.0",