/gamerule <rule name> <value> or
/gamerule <rule name> Allows the player to adjust several base settings. Rule Names: doFireTick, doMobLoot, doMobSpawning, doTileDrops, keepInventory, mobGriefing.
- All values true/false, respectively
doFireTick = toggles fire spread on/off
doMobLoot = toggles drop items on/off (xp still drops)
doMobSpawning = toggles on/off mob spawning
doTileDrops = toggles farmed items (wheat, melon slices, etc.) drops on/off
(still drop seeds even if off)
keepInventory = toggles keeping your inventory when you die on/off
mobGriefing = toggles Creeper block damage, Wither explosions and Enderman block pickup on/off
commandBlockOutput = toggles showing
command block output in chat
But I suggest avoid using it as it does cheapen the cost of dieing. But to each there own I can't tell you how to play or how you have fun. Just here to help.