Kod:
command /çöpkutusu:
trigger:
garbage(player)
function garbage(p: player):
wait 1 ticks
set metadata tag "garbage" of {_p} to chest inventory with 6 rows named "&8Çöpü paraya çevir"
open (metadata tag "garbage" of {_p}) to {_p}
inventory close:
event-inventory = (metadata tag "garbage" of player):
set {_p} to player
set {_items::*} to all items in {_p}'s current inventory
loop {_items::*}:
add 1 to {_coins}
add {_coins} to player's balance