Admin Items Skript (Need Help)

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

Nils Bertling

Member
Feb 18, 2021
1
0
1
19
Hey, I made a Admin Items Skript, so that normal players can see them but only Admins can edit them.
The Skript worked in 1.12.2 but the saving mechanism wont work in 1.16.4. Can somebody help me with that?

[EDIT] Also there is no error message if i reload the Skript [EDIT]

Code:
command /adminitems [<text>]:
    aliases: ai
    trigger:
        if arg-1 is "admin":
            if player has permission "cb.admin":
                open virtual chest inventory named "&c&lAdmin-Items" with size 6 to player
                set {_slot} to 0
                loop 54 times:
                    set slot {_slot} of current inventory of player to {chest::%{_slot}%::Notch}
                    add 1 to {_slot}
            else:
                send "&c&lSystem &r&8»&c No Permissions" to player

        if arg-1 is not set:
            open virtual chest inventory named "&c&lAdmin-Items list" with size 6 to player
            set {_slot} to 0
            loop 54 times:
                set slot {_slot} of current inventory of player to {chest::%{_slot}%::Notch}
                add 1 to {_slot}

on inventory click:
    if name of event-inventory is "&c&lAdmin-Items list":
        if index of event-slot > -1:
            cancel event

on inventory close:
    if inventory name of current inventory of player is "&c&lAdmin-Items":
        set {_slot} to 0
        loop 54 times:
            set {chest::%{_slot}%::Notch} to slot {_slot} of current inventory of player
            add 1 to {_slot}
        send "&c&lSystem &r&8» &c Saved Admin-Items" to player
 
Last edited:
Status
Not open for further replies.