/
You can toggle enable an disable KeepInventory. This is per player and each can choose if they want to keep the items and xp.
/keepinventory false
/keepinventory true
/keepinventory check <player> to know the status of the player.
/keepinventory check BlauToad