View Single Post
  #12  
Old 10-15-2009, 01:17 AM
uda uda is offline
Wanderer
 
Join Date: Oct 2009
Posts: 8
Default

Grimm,

If you take a look at the API docs for the ScriptInterface class at the end you'll see a function called registerMenu()

https://lsd.ca/umc/docs/plugin-api/c...Interface.html

Example
Code:
public void init(ScriptInterface script) {
    script.registerMenu(
        "Salvage",
        new JMenuItem("Materials"),
        "com.lsd.udabot.plugins.salvage.Crafting",
        "showFrame");
}
This registers the top level name Salvage under Plugins with a menu item of Materials which calls the showFrame() function of the com.lsd.udabot.plugins.salvage.Crafting class.
Reply With Quote