MZ need js to remove the item command from battle

Hey guys, is there any way to do it making a simple plugin? i literally need to do it that way since i have the items separated into healing skills and harmful items using skills, they already consume items with another plugin that i decided was good to extend its use this way.

1619496781623.png

I saw something similar here :


But i want to disable it permanently. and i dont want to use visutella or hime just for that.

(function() { var addItemCommand = Window_ActorCommand.prototype.addItemCommand; var remove = 1; Window_ActorCommand.prototype.addItemCommand = function() { if (!remove > 2) { addItemCommand.call(this) } } })();

that is what i was trying, but doesnt work.
Hi there!
See if it will work for you, Just add it as a plugin and you are good to go:
1619548028334.png

easy and simple ty very much. it was even just single line.
Thread closed

Original thread: https://forums.rpgmakerweb.com/threads/need-js-to-remove-the-item-command-from-battle.135923/