\\protectarea
Sets the selected area as a protected area.
\\protectarea| Dflt USM Sec Lvl: | WorldEdit |
|---|---|
| Dflt Required Tags: | canUseChatCommands |
| Categories: | system, world, server, worldedit |
| Version: | 2.0.0 |
| Undo Supported: | N/A |
| Functional: | Yes |
| Deprecated: | No |
Syntax ​
\\protectarea [-o] <areaType: string> <name: string> [mode: (0|1)[?=0]] [icon_path: string]
Arguments ​
[-o]: flags
A flags parameter.
Here are what each of the flags do:
o: Causes the command to overwrite the saved protected area if one exists with the same id.
<areaType: string>: string
The category of the protected area.
For built-in categories, it should be specified like noBlockBreakArea:. The : is necessary.
For custom categories, it should NOT have a : at the end.
<name: string>: string
The uniquie identifier of the protected area.
[mode: 0|1(default=0)]: int
The mode of the protected area.
0: The area is protected.
1: The area is excluded from protection from any other areas of the same category.
For example if there was an area with mode 0 of the built-in category noBlockBreakArea: that covered 23 50 26 to 37 80 50, then an area with mode 1 of the bulit-in category noBlockBreakArea: that covered 28 60 29 to 34 70 32 would cause any block breaking in the area 28 60 29 to 34 70 32 to not be prevented.
If there was an area with mode 0 of the built-in category noBlockBreakArea: that covered 23 50 26 to 37 80 50, then an area with mode 1 of the custom category myCustomNoBlockBreakingAreaCategory that covered 28 60 29 to 34 70 32 would NOT cause any block breaking in the area 28 60 29 to 34 70 32 to not be prevented.
If there was an area with mode 0 of the built-in category noBlockBreakArea: that covered 23 50 26 to 37 80 50, then an area with mode 1 of the built-in category protectedArea: that covered 28 60 29 to 34 70 32 would also NOT cause any block breaking in the area 28 60 29 to 34 70 32 to not be prevented.
So for a mode 1 (exclusion) area, it MUST be in the exact same category as the mode 0 (protection) area that it is trying to exclude the protection from.
Mode 1 areas ALWAYS have priority over mode 0 areas.
Default: 0
[icon_path: string]: string
The icon path of the protected area.
This is used in the Manage Protected Areas menu.
If left blank, the area will have no icon.
The icon path should be relative to the root folder of the resource packs.
The file extension is optional.
Examples:
textures/blocks/stonetextures/ui/debug_glyph_colortextures/ui/debug_glyph_color.pngpack_iconpack_icon.png
Result ​
| Command | Trigger | Result |
|---|---|---|
Any | The command is incomplete, or any argument is not specified correctly. | Unparseable |
| There is already an area in the specified category with the same name and the `-o` flag was not specified. | Failed | |
| The specified category does not exist. | Failed | |
| Otherwise | Successful | |
Examples ​
- To add the selected area as the protected area to the built-in category
noBlockBreakArea:, with the namemyAntiBlockBreakingArea1, and the icon pathtextures/blocks/stone:\\protectarea noBlockBreakArea: myAntiBlockBreakingArea1 0 textures/blocks/stone
- To exclude the selected section of a
noBlockBreakArea:protected area from the protection:\\protectarea noBlockBreakArea: myAntiBlockBreakingArea1_exclusion1 1
- To addd the selected area as the protected area to the custom category
myCustomCategory, with the namemyCustomProtectedArea1, and the icon pathtextures/ui/debug_glyph_color:\\protectarea myCustomCategory myCustomProtectedArea1 0 textures/ui/debug_glyph_color
History ​
| Debug Sticks | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ? | ? | Added | |||||||||||||
| v1.33.0 | release | The | |||||||||||||
Added the | |||||||||||||||
| Server Utilities | |||||||||||||||
| v1.35.0 | RC1 | Fixed a bug where the | |||||||||||||
