Solved Any way to reset players endechest?

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

Uzumaki

Well-Known Member
Feb 20, 2017
310
10
18
33
Any way to reset ender chest of a player?
 
Last edited:
This is not tested, so im not sure if this is working.

code_language.skript:
command /clearender [<offline player>]:
    permission: enderchest.clear
    permission message: &cNo permissions.
    trigger:
        if arg-1 is not set:
            message "&cUse /clearender <player>"
        else:
            if arg-1 is not online:
                set {clearender::%arg-1's uuid%} to true
                message "&cEnderchest of %arg-1% cleared."
            else:
                delete {clearender::%arg-1's uuid%}
                message "&cEnderchest of %arg-1% cleared."
                open enderchest of arg-1 to player
                set {_num} to 0
                loop 36 times:
                    set slot {_num} of player's current inventory to air
                    add 1 to {_num}
                close player's inventory
on join:
    if {clearender::%player's uuid%} is set:
        delete {clearender::%player's uuid%}
        open enderchest of player to player
        set {_num} to 0
        loop 36 times:
            set slot {_num} of player's current inventory to air
            add 1 to {_num}
        close player's inventory
 
  • Like
Reactions: Uzumaki
code_language.skript:
        open enderchest of player to player
        set {_num} to 0
        loop 36 times:
            set slot {_num} of player's current inventory to air
            add 1 to {_num}
        close player's inventory
is enought thank you, works.
 
Status
Not open for further replies.