is there a way to prevent item spam?

i'd like to add a system where the player cant spam healing items on characters, i was thinking something like Five Nights at F***boy's dietary guilt and alcoholism points, which prevents spamming healing and mp restores on one character. is there a way to do this with or without plugins?
You can limit the total amount of the item the player can have, put some arbitrary restriction on the scene where the player is only allowed x uses of the item, or use a cooldown so they can only use it once every x seconds.
The entire source code for the game is in your js folder, so there's a way to do anything you want.

It would make more sense for you to decide what method you want your game to use, then ask if you can't figure out how to implement it.

I'll proffer the suggestion that at its base, this is a game balance issue. Every turn you spend using a healing item is a turn you're not actually progressing toward winning the fight.

And every healing item you use should be resources (gold or time spent grinding) you had to earn that are gone.

So the most basic things to look at are:
- Why are you afraid of the player "spamming" healing items? Why would that be a successful strategy for the player? In classical JRPGs, you'll lose ground doing that (e.g. the enemy does a bit more damage than you can heal), so even if you had infinite potions, you'd eventually still die.

- Why does the player have the resources to spend on that strategy? Why aren't healing items just a bit more rare or a bit more expensive?

Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-to-prevent-item-spam.156915/