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.

API SkEdit || Return Update 1.0

Its like worldedit. but complitely in skript

  1. Jeroeno_Boy
    Supported Minecraft Versions:
    • 1.9, 1.10, 1.11, 1.12
    SkEdit.jpg Donate
    What is SkEdit?
    SkEdit is a API that allows you to mainly fill and paste in structures. it is not created to copy Worledit, nor to compete with it. The fill and pasting is based on a delay system, its standart set to (Fill: 20000 blocks per tick, and copy: 1000 blocks per tick).

    Know: this was made on Dev36 and might not work on newer/older versions, its known to not work propperly on 2.3.6


    Commands:
    • /ske (ske.admin)
    • /skedit (ske.admin)


    Features:
    • [✓] Copy and paste system
    • [✓] Fill system
    • [✓] Schematic system
    • [✓] Skript only (no other addons required)
    • [✓] Small command system [/ske]
    • [✓] Gui System
    • [✓] Api
    • [✓] Improve the return so its more usefull
    • [✓] use block id and skript alias for block fill
    • [✓] Semi async block placing and copying

    API:
    Code (Text):
    1. Return V2:[/B][/B][/B][/B][/B][/B]
    2. [B][B][B][B][B][B]    Usage: set {_R} to Ske("Function", {_Objects})
    3.     Note:
    4.         This function is NOT for beginners, it has complex code that can be hard to use. you might need to look into SkEdit on how to use a function propperly.
    5.  
    6.     Example: (command: /ske fill)
    7.  
    8.         # Defining the objects
    9.         add skePos(1, player) to {_Obj::*}
    10.         add skePos(2, player) to {_Obj::*}
    11.         add arg 2 to {_Obj::*}
    12.         set {_R} to ske("Fill", {_Obj::*}) # Executing the function with a triggered smart object
    13.  
    14.         # Checking if there is a problem with the objects, if there is. it will return a string, else a integer that is the "SkID"
    15.         if {_R} parsed as a integer is a integer:
    16.  
    17.             set {_B::*} to skIDGetstate({_R} parsed as a integer) # To get the current SkID return variables
    18.             message "&8[&4SkEdit&8] &fFilling blocks..."
    19.             message "&8[&4SkEdit&8] &fTotal blocks: &c%{_B::2}%"
    20.             message "&8[&4SkEdit&8] &fEstimated time: &c%(Rounded ({_B::2}/{ske::speed::paste::Blocks}*{ske::speed::paste::MaxDelay}*100))/30% seconds"
    21.  
    22.             #Starting the loop, and checking if its done
    23.             set {_Now} to now
    24.             while {_B::1} = false:
    25.                 wait skeDelay("paste") #To delay so it matches the delay of the (in this case, paste) max delay
    26.                 if difference between now and {_Now} is more than 1 second:
    27.                     message "&8[&4SkEdit&8] &fProgress: &c%{_B::2}% &fBPC, &c%{_B::3}%&f Cycles, &c%{_B::4}% &fBlocks left"
    28.                     set {_Now} to now
    29.                 set {_B::*} to skIDGetstate({_R} parsed as a integer) #Again, to get the curren SkID variable
    30.  
    31.             # when its done
    32.             message "&8[&4SkEdit&8] &fSuccesfully pasted &c%{_B::2}% &fBlocks, in &c%{_B::3}% &fCycles"
    33.             message "&8[&4SkEdit&8] &fTotal time: &c%{_B::4}%"
    34.  
    35.         #Something went wrong.
    36.         else:
    37.             message "&8[&4SkEdit&8] &fFailed pasting due to: &c%{_R}%"


    To use with the "SKE" function, please note the name of the function, (PlayerCopy, SaveSchem, Fill, etc). also, not all the functions are supportet! only the block copy and paste ones!
    Code (Text):
    1. Players only:
    2.     GiveWand:
    3.         Syntax:    skeGivewand(player)
    4.         Example: skeGivewand(player)
    5.         Notes:
    6.             Gives the SkEdit wand
    7.  
    8.     GetPosition:
    9.         Syntax: skePos(position, player)
    10.         Example: set {_Pos} skePos(1, player)
    11.         Returns:
    12.             - postion x of player's selection
    13.             - Nothing, invalid position
    14.         Notes:
    15.             Gives the first or second position, can only be 1 and 2
    16.  
    17.     PlayerCopy:
    18.         Syntax: skePCopy(Location 1, Location 2, player)
    19.         Example: set {_R} to skePCopy(skePos(1, player), skePos(2, player), player)
    20.         Returns:
    21.             - Nothing (Everything went well)
    22.             - Location x not set
    23.             - Player not found
    24.             - Different worlds of positions
    25.         Notes:
    26.             Copies block, its slower than pasting or filling
    27.  
    28.     PlayerPaste:
    29.         Syntax: skePPaste(player)
    30.         Example: set {_R} to skePPaste(player)
    31.         Returns:
    32.             - Nothing (Everything went well)
    33.             - Clipboard empty
    34.             - Player not found
    35.         Notes:
    36.             Pasts the clipboard of the player
    37.  
    38.     PlayerSaveSchem:
    39.         Syntax: skePSaveSchem(location 1, location 2, "new Schematic", player)
    40.         Example: set {_R} to skePSaveSchem(skePos(1, player), skePos(2, player), arg 3, player)
    41.         Returns:
    42.             - Nothing (Everything went well)
    43.             - Location x not set
    44.             - Different worlds of positions
    45.             - Schematic already exists
    46.             - Player isnt online
    47.         Notes:
    48.             Saves a schematic relative to the player
    49.  
    50.     PlayerLoadSchem:
    51.         Syntax: skePLoadSchem("Schematic", player)
    52.         Example: set {_R} to skePLoadSchem(arg 3, player)
    53.         Returns:
    54.             - Schematic does not exist
    55.             - Nothing (Everything went well)
    56.         Notes:
    57.             Loads the schematic to the player's clipboard
    58.  
    59.  
    60. Global:
    61.     Fill:
    62.         Syntax:    skeFill(Location 1, Location 2, Blocks)
    63.         Example: set {_R} to skeFill(skePos(1, player), skePos(2, player), "Sand||stone||dirt")
    64.         Returns:
    65.             - Nothing (Everything went well)
    66.             - Location x not set
    67.             - World are different
    68.         Notes:
    69.             - Doesnt check if the block is valid or not
    70.             - There can be multiple blocks, seperatet at "||" example: "Red wool||White wool||Orange wool"
    71.  
    72.     SaveSchem:
    73.         Syntax: skeSaveSchem(Location 1, Location 2, "new schematic")
    74.         Example: set {_R} to skeSaveSchem({_Loc1}, {_Loc2}, "Tower_Tier_1")
    75.         Returns:
    76.             - Nothing (Everything went well)
    77.             - Position x not set
    78.             - Different worlds
    79.             - Schematic already exist
    80.         Notes:
    81.             Saves the schematic relative to location 1
    82.  
    83.     PasteSchem:
    84.         Syntax: skeSchemPaste(Center location, world, "schematic")
    85.         Example: set {_R} to skeSchemPaste(location of player, world of player, arg 3)
    86.         Returns:
    87.             - Nothing (Everything went well)
    88.             - Center not set
    89.             - Schematic doesnt exists
    90.             - World does not exist
    91.         Notes:
    92.             Pastes from where the schematic has been created
    93.  
    94.     ShowSchems:
    95.         Syntax: skeShowSchems()
    96.         Example: set {_list::*} to skeShowSchems()
    97.         Returns:
    98.             - List of all schems
    99.             - No schematic set (No schematics exist)
    100.  
    101.     DeleteSchem:
    102.         Syntax: skeDeleteSchem("schematic")
    103.         Example: set {_R} to skeDeleteSchem("Lol")
    104.         Returns:
    105.             - Nothing (All went succesful)
    106.             - Invalid schematic (Schematic doesnt exist)
    107.  
    108.     Random:
    109.         Syntax: Random(Min, Max{, Times}) #in {} is unnceseary and defaulted to 5
    110.         Example: set {_RandomVariable} to Random(5, 100)
    111.         Returns:
    112.             - Number
    113.  

    Addons:
    - SkQuery-lime 3.6.4
    - Skellett

    - SkRayFall (for sound)


    Need help or found a bug? Join the discord! dont leave in the revieuw. https://discord.gg/cNcxs7n

Recent Updates

  1. Full release
  2. Fix (BETA 4 Patch 1)
  3. Return update! (BETA 4)

Recent Reviews

  1. couger44
    couger44
    5/5,
    Version: BETA 3 Patch 1
    Although I do not usually play or program in Skript 1.9, I gave myself the time to download the version of Skript for Spigot 1.9 and try this API, and I can tell you that it works perfectly.
    1. Jeroeno_Boy
      Author's Response
      Thanks for the awsome revieuw :D
  2. S
    Stevecv
    5/5,
    Version: BETA 3 Patch 1
    This was very good at loading in massive edits and it didn't crash my server!
    1. Jeroeno_Boy
      Author's Response
      Thanks for the revieuw :D
  3. T
    TPGamesNL
    1/5,
    Version: BETA 2
    It does work, but:
    1. It doesn't even parse (you can even check the parser for this). Did you even test this thing?
    2. Spelling mistake at lines 452, 620 and 670 (shematic)
    3. Why are you looping blocks between 2 locations when you're only using the X/Y/Z (1 of those per loop) coordinates from those blocks? It's much easier to just loop the numbers/integers.
    4. In all of the cases where you get blocks in a cube, you set the X/Y/Z variables in the third loop (the Z loop), but there is no need to set the X and Y variable that often, since their values won't change in the next iteration of the loop
    5. No block data is saved (e.g. rotation / repeater tick amount / open or closed blocks)
    6. Since you're using strings for items in the fill function, there is no way to use blockdata for fill (e.g. "open oak trapdoor" is closed using fill)
    7. Rounding down an integer does nothing (line 444 and more)
    8. There is no need to loop the schemlist in line 531, since you're only using the loop-value after that point and you already know the loop-value before looping: {_schem}

    I hope you can learn from this review.