MV Doubts about activating plugin

I would like to make a bestiary, I made a common event (EnemyBooh.js) and put it as an option in the menu and paid using YEP_MainMenuManger, but I wanted the option to only appear when a character gave you a specific item like a Book, for example.
Welcome!

I'm having a bit of a hard time understanding the situation.

A plugin file has nothing to do with a common event.

There are several existing bestiary plugins you can use, and they should all have plugin commands to turn the menu command on and off.

But Yanfly's Main Menu Manager also has that option:
1734617190555.png


That's what "enabled" means. So you could, for example, put in the Enabled field
Code:
$gameSwitches.value(42)
and the menu command will be disabled until you have an event give a book to the player and turn switch 42 ON.
Hello, thank you for proposing to answer, but I think I have to explain a little better hahaha.

I'm using the Book of the Enemy.js (1º photo), it's basically a bestiary, I wanted to put it in the menu, then I made a common event for it (2nd photo), w put it in YEP_Main Menu Manager.js (3rd photo). And that worked well, but I wanted this option to only appear in the menu after I talk to a specific npc.
set show on $gameSwitches.value(n)
so when its on, it shows up.

another way for showing is to use:
$gameParty.hasItem($dataItems[n]) (change n to the item ID)

and it shows when the player has the item in their inventory.
$gameParty.hasItem($dataItems[n])
Thank you very much at first I didn't understand anymore then I got the idea. It worked perfectly, thank you again!

Original thread: https://forums.rpgmakerweb.com/threads/doubts-about-activating-plugin.174021/