How do I clear a player's entire inventory?

I am making what I call a "reincarnation system" when you die from a certain event the items in your inventory including equipped items get deleted.

I've searched all over the internet but only get results for MV and not MZ
I tried using "$gameParty._items = {};" but it doesn't function in MZ

Does anyone know any plugins or code to deal with this?
rmmz_objects.js file lines 5394-5398:
JavaScript:
Game_Party.prototype.initAllItems = function() {
    this._items = {};
    this._weapons = {};
    this._armors = {};
};

The code should work, though I believe you need $gameMap.requestRefresh() as well:
JavaScript:
$gameParty._items = {};
$gameMap.requestRefresh();
Or do to all items, weapons, and armors:
JavaScript:
$gameParty.initAllItems();
$gameMap.requestRefresh();

You can find more info here:
RPG MV/MZ Script Calls
Thank you so much! It worked perfectly.

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-clear-a-players-entire-inventory.165809/