SKRegions - A simple regions manager

Script SKRegions - A simple regions manager 1.2

  • 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!

mKtESy8.png

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_language.skript:
<world>:
  <region>:
    '1': x y z
    '2': x1 y1 z1
  <region>:
    '1': x y z
    '2': x1 y1 z1
<world>:
  <region>:
    '1': x y z
    '2': x1 y1 z1
Here's an exemple for two regions in 'world' and one in 'end'
code_language.skript:
world:
  dac:
    '1': -32 89 -110
    '2': -25 93 -105
end:
  cp0:
    '1': -32 25 -19
    '2': -28 28 -18
  reception:
    '1': -45 12 -8
    '2': -40 14 4

  • Commands
code_language.skript:
/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_language.skript:
/skr create <region> [file]
Create a region with you current World Edit selection in the file.
code_language.skript:
/skr clear <region> [file]
Delete an existent region in the file. If <region> is '*', it will delete the file.
code_language.skript:
/skr display <region> [file]
Set your current World Edit's selection to an existent region in the file.
code_language.skript:
/skr list [file]
List all the recognized regions. Useful to detect any errors after a file's modification.

code_language.skript:
/regionsWGtoSK <file> <regions' world>
Convert World Guard's regions of the file to SKRegions in a new file.

  • Functions
code_language.skript:
LocisWithin(loc: location,region: text,f: text="regions.yml") :: boolean:
Return true if the location is in the region.
code_language.skript:
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_language.skript:
LocInRegions(loc: location,f: texts) :: text:
Same as before, but allows several regions.
code_language.skript:
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_language.skript:
skregionclear(region: text, file: text="regions.yml") :: boolean:
Delete the region of the file. Returns false if an error was encountered.
Author
Aerosmite
Downloads
1,745
Views
1,745
First release
Last update
Rating
0.00 star(s) 0 ratings

Latest updates

  1. Bug fixes

    Fixed bugs.
  2. Added LocInRegions

    Added LocInRegions: LocInRegions(loc: location,f: strings) :: text: Same as LocInRegion, but...
  3. Minor changes

    Changing the LocisWithin and LocInRegion.