on mine:
set {_drops::*} to drops of block
clear drops
if player has enough space for {_drops::*}:
give player {_drops::*}
else:
add {_drops::*} to {excess.%player's uuid%::*}
send title "&cFull inventory!" to player
broadcast "%{excess.%player's uuid%::*}%"
command test:
trigger:
#if player has enough space for {excess.%player's uuid%::*}:
add {excess.%player's uuid%::*} to player's inventory
#{excess.%player's uuid%::*}
#else:
#send title "&cNot enough space!" to player
i disabled some parts of the test command to see if it worked without checking the space in players inventory and it does? but it clears the variable and doesnt give all items