MZ Disable Regen On Map

Hello! I'm working to port my game Proverbs of Hell from MV to MZ, and I'm looking for an MZ plugin that disables passive HP regen while not in battle.

Alternatively, if this is possible without a plugin I'd appreciate some guidance. Thank you in advance!
JavaScript:
const disableMapRegen = Game_Battler.prototype.regenerateAll;
Game_Battler.prototype.regenerateAll = function() {
    if (!$gameParty.inBattle()) return;
    disableMapRegen.apply(this);
};

This snippet will disable all (HP, MP, TP) regeneration outside of battle.

Do you only want HP regeneration disabled? If so, use this snippet:

JavaScript:
const disableMapRegen = Game_Battler.prototype.regenerateHp;
Game_Battler.prototype.regenerateHp = function() {
    if (!$gameParty.inBattle()) return;
    disableMapRegen.apply(this);
};

Original thread: https://forums.rpgmakerweb.com/threads/disable-regen-on-map.148834/