Paste #44994: Diff note for paste #44993

Date: 2017/10/14 17:22:52 UTC-07:00
Type: Diff Report

View Raw Paste Download This Paste
Copy Link


 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>
         #