MV Sealing the Item Menu in Battle?

I'm looking for a way to use a state to seal the use of items. I have all the Yanfly plugins, including the Buff State Core... I'm sure it's a script call or something but I have no idea how to do it.

I've looked through the forums to see if there's something similar here, but I didn't see anything.

Essentially, I'm just trying to make a state that acts like what Silence does for skills, but for Items.
From the looks of it, this would disable the command entirely based on a switch, not quite sure if that's good enough, since you'll probably want it per actor.

It's also possible to use hime's actor battle commands to then show/hide commands via a custom state notetag, which is what I do.
I remembered very clearly seeing a plugin that lets you define a "fake" Item skill so you can seal items… but upon searching, it seems like the plugin in question was caethyril's MZ tweaks plugin.

That said, I would not be surprised if the exact approach also works in MV…
From the looks of it, this would disable the command entirely based on a switch, not quite sure if that's good enough, since you'll probably want it per actor.

It's also possible to use hime's actor battle commands to then show/hide commands via a custom state notetag, which is what I do.
How do you make the custom state?
Hmmm, can't you make the addItemCommand use the enabled argument too (change state id)?

Window_ActorCommand.prototype.addItemCommand = function() {
this.addCommand(TextManager.item, 'item', !this._actor.isStateAffected(id));
};
Hmmm, can't you make the addItemCommand use the enabled argument too (change state id)?

Window_ActorCommand.prototype.addItemCommand = function() {
this.addCommand(TextManager.item, 'item', !this._actor.isStateAffected(id));
};
So, I add this to a script call in a parallel common event? Add it to my Item/Silence State?
No, that's a plugin, so you need to put it in a plugin file.
No, that's a plugin, so you need to put it in a plugin file.
Hmmm, can't you make the addItemCommand use the enabled argument too (change state id)?

Window_ActorCommand.prototype.addItemCommand = function() {
this.addCommand(TextManager.item, 'item', !this._actor.isStateAffected(id));
};
Thanks be to both of you... This works like a charm!

Original thread: https://forums.rpgmakerweb.com/threads/sealing-the-item-menu-in-battle.180788/