Bukkit/Bukkit — comment on commit 1a9118f8d26202ad41202e2017b3f7691dcedef8
File:  line 0
By mikeprimm:

Its even less than that - the server sends the client 3 numbers: the exp level costs, nothing more (everything else on the UI is just window-dressing generated by the client). The client uses the 3 numbers to decide which choices the user can make (any higher than their current level isn't selectable). If the user applies the enchant, all that comes down is the index of which of the 3 choices offered was made. The server then uses the level associated with that number, along with the item type, to create a random set of enchants, which is what we let you tailor with the second event.

Logically, since you can tailor whatever DOES get applied, you can do whatever you want to do during the first event - if you want to make a set of tailed enchants, and then apply those when-and-if the users opts to use them, your free to do so when handling the first event (just make and save them during the first one, doing whatever interaction with the user you choose, and then replace the generated ones during the second event). Us doing that sort of thing gets beyond our 'minimum change' goals - the plugin can apply this logic as well as we ever could, and the limitations of the standard interaction between the client and the server restricts what we could accomplish anyway.