worldguard_regions_to_notable_cuboids:
type: world
debug: false
events:
on script reload:
+ - define c_list 'li@'
- foreach <server.list_worlds> {
- - define w '<def[value]>'
- - foreach <def[value].list_regions> {
- - define r '<def[value]>'
- - note <def[r].cuboid> 'as:wgregion_W_<def[w]>_R_<def[r]>'
- }
+ - define w '<def[value]>'
+ - foreach <def[value].list_regions> {
+ - define r '<def[value]>'
+ - note <def[r].cuboid> 'as:wgregion_W_<def[w]>_R_<def[r]>'
+ - define c_list '<def[c_list].include[wgregion_W_<def[w]>_R_<def[r]>]>'
+ }
+ }
+ - foreach <server.list_notables[cuboids].parse[notable_name].exclude[<def[c_list]>]> {
+ - note remove as:<def[value]>
}
#on player enters wgregion_W_example_world_R_example_region:
#- cmd
#on player exits wgregion_W_example_world_R_example_region:
#- cmd
#
# Replace "wgregion_W_example_world_R_example_region" with the noted
# cuboid. For example, "wgregion_W_world_the_end_R_coolNetherSpawn"
#
# The general format of the noted regions is:
# wgregion_W_<world name>_R_<region name>
#