addPlayerMenuItem
addPlayerMenuItem: (MenuManager, string) -> ()menuText takes the first free of the client's player-option slots 5 to 8 (none free, nothing happens), low priority, so every player's menu shows it as an entry of type CLIENT_PLAYER (identifier the player's index, deprioritized, announced by MenuEntryAdded like the game's own player options): a click on it posts MenuOptionClicked and sends nothing to the server, and interactPlayer never clicks it as a game option. When the game's SET_PLAYER_OP takes its slot, it moves to the next free one. After a client reset (a world hop, a logout) the item is written back on the next client cycle. The text is kept as the client keeps it: NUL characters removed, at most 256 bytes; an empty text adds nothing (the client shows no option for an empty slot). Called before the client's first cycle (a startUp), it is written at that cycle.
Only a client whose menu Bento hooks can be written: on another nothing is shown, and the first call from each plugin logs a warning saying so. There, show the item from onMenuEntryAdded(event): for a player option entry (event:getType() from MenuAction.PLAYER_FIRST_OPTION:getId() to PLAYER_EIGHTH_OPTION:getId()), once per player, client:getMenu():createMenuEntry(-1):setOption(menuText) :setTarget(event:getTarget()):setType(MenuAction.CLIENT_PLAYER) :setIdentifier(event:getIdentifier()):setDeprioritized(true), then onClick(fn).