#Author: Icecapade #Date: 2021-03-15 #Version: 1.0.1 WGConverter: type: command debug: false name: wgtodenizen description: converts worldguard regions to useable notables usage: /wgtodenizen [world/all] (regionname) permission: wgconverter.admin tab complete: - choose "": - case 0: - if != null: - determine ]]> - else: - determine - case 1: - if ]||null> == null: - stop - if == all: - stop - if != null: - determine ].list_regions.parse[id].filter[starts_with[]]> - else if != all: - determine ].list_regions.parse[id]> script: - choose : - case all: - narrate "Converting all WorldGuard-regions in useable Denizen notables.." format:WGConverter_format - foreach as:world: - foreach <[world].list_regions> as:region: - if <[region].cuboid||null> == null: - narrate "The region <[region].id> is not a cuboid-shaped region and can not be converted yet. Skipping." format:WGConverter_format - foreach next - note <[region].cuboid> as:WG_<[region].id> - narrate "The region <[region].id> was sucessfully converted to a cuboid notable called WG_<[region].id>" format:WGConverter_format - wait 1t - case null: - narrate "Syntax: /wgtodenizen [<<>world_name<>>/all] (<<>region_name<>>)" - default: - define world - if !]>: - narrate "This world does not exist." format:WGConverter_format - stop - define region_name - if <[region_name]> == null: - narrate "You must specify a region name." format:WGConverter_format - stop - if !].has_region[<[region_name]>]>: - narrate "This world does not have a region called <[region_name]>" format:WGConverter_format - stop - define region ,<[world]>].cuboid||null> - if <[region]> == null: - narrate "This region is not a cuboid-shaped region and can not be converted yet." format:WGConverter_format - stop - narrate "The region <[region_name]> was sucessfully converted to a cuboid notable called WG_<[region_name]>" format:WGConverter_format - note <[region]> as:WG_<[region_name]> WGConverter_format: type: format debug: false format: [WGConverter]