1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Script SKRegions - A simple regions manager 1.2

Manage and use multiple YML files of regions for your scripts !

  1. Aerosmite

    SKRegions is a simple region-data manager that allows multiple YML files for more clarity and optimization.
    Required addons: SKUtilities, SKQuery, SKStuff

    • Getting started
    First, you'll have to set the path of the folder where files are supported. Open the script with your favorite text editor and change the path value in options (the default value is plugins/Skript/scripts/SKRegion/). Do not forget the slash at the end ! You can also change here the required permission (perm value) to execute commands.
    Capture d’écran 2017-03-25 à 13.05.39.png

    • Your Folder
    In this folder, you can edit, add or remove any file at any time but just be sure it's always YML files. The contents of a correct file should follow this pattern:
    Code (Skript):
    1. <world>:
    2.   <region>:
    3.     '1': x y z
    4.     '2': x1 y1 z1
    5.   <region>:
    6.     '1': x y z
    7.     '2': x1 y1 z1
    8. <world>:
    9.   <region>:
    10.     '1': x y z
    11.     '2': x1 y1 z1
    Here's an exemple for two regions in 'world' and one in 'end'
    Code (Skript):
    1. world:
    2.   dac:
    3.     '1': -32 89 -110
    4.     '2': -25 93 -105
    5. end:
    6.   cp0:
    7.     '1': -32 25 -19
    8.     '2': -28 28 -18
    9.   reception:
    10.     '1': -45 12 -8
    11.     '2': -40 14 4

    • Commands
    Code (Skript):
    1. /skregion <create|clear|display|list> [region] [file]
    The main command. The file is automatically added if it doesn't exist. When the file's name is not given, it'll be by default regions.yml.
    Code (Skript):
    1. /skr create <region> [file]
    Create a region with you current World Edit selection in the file.
    Code (Skript):
    1. /skr clear <region> [file]
    Delete an existent region in the file. If <region> is '*', it will delete the file.
    Code (Skript):
    1. /skr display <region> [file]
    Set your current World Edit's selection to an existent region in the file.
    Code (Skript):
    1. /skr list [file]
    List all the recognized regions. Useful to detect any errors after a file's modification.

    Code (Skript):
    1. /regionsWGtoSK <file> <regions' world>
    Convert World Guard's regions of the file to SKRegions in a new file.

    • Functions
    Code (Skript):
    1. LocisWithin(loc: location,region: text,f: text="regions.yml") :: boolean:
    Return true if the location is in the region.
    Code (Skript):
    1. LocInRegion(loc: location,f: text="regions.yml") :: text:
    Return the region of the file in which the location is (else it returns the text 'none').
    So make files with only the useful regions to avoid lag !
    Code (Skript):
    1. LocInRegions(loc: location,f: texts) :: text:
    Same as before, but allows several regions.
    Code (Skript):
    1. skregionadd(region: text, loc1: location, loc2: location, file: text="regions.yml") :: boolean:
    Add the region in the file. Returns false if an error was encountered.
    Code (Skript):
    1. skregionclear(region: text, file: text="regions.yml") :: boolean:
    Delete the region of the file. Returns false if an error was encountered.
    WaxtzCraft and YoshYz like this.

Recent Updates

  1. Bug fixes
  2. Added LocInRegions
  3. Minor changes