Border shrink checker

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

SandyVerse

Active Member
Mar 19, 2017
51
0
0
33
Category: Border Shrink

Suggested name: Border Shrink

What I want:
Essentially, using the Minecraft vanilla 1.8 border, I want a /checkborder to see what the border would be at currently (down to the last block, preferably). Ex: The border is at 752x752, when I run /checkborder, it shows that exact size, but when I do /checkborder again, it shows the newly updated border shrink.

Ideas for commands: /checkborder

Ideas for permissions: skript.op

When I'd like it by: ASAP








(Using the code from this)
code_language.skript:
#This is a shrink border skript made by OrganizedMadness!
#Feel free to edit anything  in the Options that you want!

#Before using the /shrink command, make sure you have the worldborder set up in the chosen world first
#Use /minecraft:worldborder center 0 0 on the chosen world
#Then do /minecraft:worldborder set [Diameter] - Not to be confused with radius!

#WARNING: If the world border is still moving whilst you execute a command, the border will glitch. Please wait till the shrink is complete.

Options:
    P: &8[&bAbyssal&8]&R #Set server name and colour's
    N: %command sender%&6 #Set colour of the command sender
    C: &7 #Set the colour of the text - default is organge
    Q: &c&L #Set the second colour of the text - default is red bold/&c&L

command /shrink <integer> <integer>:
    usage: /shrink <diameter OR halt> <time in minutes>
    permission: skript.op
    trigger:
        set {_Shrink} to true
        if arg 1 is a number:
            broadcast "{@P}{@C} Preparing to Shrink Border to {@Q}%arg 1/2%x%arg 1/2%{@C} over {@Q}%arg 2% Minutes{@C}!"
            wait 1 second
            broadcast "{@P}{@C} Shrinking Border in {@Q}5"
            wait 1 second
            broadcast "{@P}{@C} Shrinking Border in {@Q}4"
            wait 1 second
            broadcast "{@P}{@C} Shrinking Border in {@Q}3"
            wait 1 second
            broadcast "{@P}{@C} Shrinking Border in {@Q}2"
            wait 1 second
            broadcast "{@P}{@C} Shrinking Border in {@Q}1"
            wait 1 second
            broadcast "{@P}{@C} Shrinking Border to {@Q}%arg 1/2%x%arg 1/2%{@C} over {@Q}%arg 2% Minutes{@C}!"
            make sender execute command "minecraft:worldborder set %arg 1% %arg 2 * 60%"
            set {_delay} to arg 2
            set {_delay} to {_delay} * 15
            while {_delay} is greater than 0:
                wait 1 second
                set {_delay} to {_delay} - 1
            broadcast "{@P}{@C} Shrinking Border to {@Q}%arg 1/2%x%arg 1/2%{@C} - {@Q}25%% {@C}Complete!"
            set {_delay} to arg 2
            set {_delay} to {_delay} * 15
            while {_delay} is greater than 0:
                wait 1 second
                set {_delay} to {_delay} - 1
            broadcast "{@P}{@C} Shrinking Border to {@Q}%arg 1/2%x%arg 1/2%{@C} - {@Q}50%% {@C}Complete!"
            set {_delay} to arg 2
            set {_delay} to {_delay} * 15
            while {_delay} is greater than 0:
                wait 1 second
                set {_delay} to {_delay} - 1
            broadcast "{@P}{@C} Shrinking Border to {@Q}%arg 1/2%x%arg 1/2%{@C} - {@Q}75%% {@C}Complete!"
            set {_delay} to arg 2
            set {_delay} to {_delay} * 15
            while {_delay} is greater than 0:
                wait 1 second
                set {_delay} to {_delay} - 1
            broadcast "{@P}{@C} Shrinking Border to {@Q}%arg 1/2%x%arg 1/2%{@C} - {@Q}100%% {@C}Complete!"
            set {_delay} to arg 2
            wait 1 second
            broadcast "{@P}{@C} World border was shrunk to {@Q}%arg 1/2%x%arg 1/2%{@C} by {@Q}{@N}{@C}!"
            
command /shrinkcenter:
    permission: skript.op
    trigger:
        make player execute command "/minecraft:worldborder center 0 0"
        send "{@P} &7You have centered the border!"
        
command /shrinksize <integer>:
    permission: skript.op
    trigger:
        make player execute command "/minecraft:worldborder set %arg-1% 0"
        make player execute command "/minecraft:worldborder damage buffer 10"
        make player execute command "/minecraft:worldborder damage amount 0.001"
        send "{@P} &7Border set!"