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]
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: