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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

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

Skript - Worldborder

Discussion in 'Skript' started by jonawoning, Oct 3, 2019.

Thread Status:
Not open for further replies.
  1. jonawoning

    jonawoning Member

    Joined:
    May 24, 2019
    Messages:
    29
    Likes Received:
    2
    Hey there!

    So I am trying to figure out if there is a way I can run a worldborder command per world from console. Currently, if you run /worldborder ... it will run it in the default world. ie: world.

    So, is there a possible way I can run a console command for a specific world? Thanks in advance. :emoji_slight_smile:

    If i set a worldborder on 625 for example, it will only do it on the default world.
     
  2. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    232
    Directly in Skript, this can't be done. This is because, as you have noticed, console commands don't work properly for Minecraft commands.

    You will need to either use an add-on (I believe SkQuery, MundoSK and Kosmos have effects for this)
    You could also use skript-mirror, something like:
    Code (Skript):
    1. set {_w} to world("world_nether")
    2. set {_b} to {_w}.getWorldBorder()
    3. {_b}.setSize(10000) #keep in mind this is diameter not radius
    The WorldBorder class has a bunch of other methods you can use as well.
     
    jonawoning and AsuDev like this.
  3. jonawoning

    jonawoning Member

    Joined:
    May 24, 2019
    Messages:
    29
    Likes Received:
    2
    It works, but i dont get damage if the border crimps.
    Only on the main world.. weird.
     
  4. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    232
    I tried in both the overworld and nether. As long as I was more than 5(ish) blocks away from the border I took damage. I think there's a buffer.
    You can also set the border to move over a specific time, ex:
    Code (Skript):
    1. {_b}.setSize(10000, 10)
    In this example, the border would get to a diameter of 10,000, and it would take 10 seconds to get there

    you can also set the damage buffer to be less, ex:
    Code (Skript):
    1. {_b}.setDamageBuffer(1)
    This would mean the player can only be 1 block past the border without taking damage.
     
    #4 ShaneBee, Oct 5, 2019
    Last edited: Oct 5, 2019
  5. jonawoning

    jonawoning Member

    Joined:
    May 24, 2019
    Messages:
    29
    Likes Received:
    2
    I already solved it, it was for a minigame i letted one random player execute the command: ''/worldborder set 100 720''
    So it shrinks.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...