Skript - Worldborder

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

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

jonawoning

Member
May 24, 2019
29
2
3
32
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.
 
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_language.skript:
set {_w} to world("world_nether")
set {_b} to {_w}.getWorldBorder()
{_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.
 
It works, but i dont get damage if the border crimps.
Only on the main world.. weird.
 
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_language.skript:
{_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_language.skript:
{_b}.setDamageBuffer(1)
This would mean the player can only be 1 block past the border without taking damage.
 
Last edited:
I already solved it, it was for a minigame i letted one random player execute the command: ''/worldborder set 100 720''
So it shrinks.
 
Status
Not open for further replies.