I have problem with my custom enderchest skript. If i first open the enderchest then save my items, but
secondly i open the enderchest the old ones appear, but the new ones are not saved.
secondly i open the enderchest the old ones appear, but the new ones are not saved.
Code:
on rightclick on a ender chest:
cancel event
open chest with 5 rows named "Big EnderChest" to player
set {_s} to 0
loop {enderchest.%player%::*}:
set slot {_s} of player's current inventory to loop-value
add 1 to {_s}
on inventory close:
if name of event-inventory is "Big EnderChest":
loop inventory size of event-inventory times:
add slot (loop-number - 1) of player's current inventory to {enderchest.%player%::*}