ActionMenu API - Simple, flexible menus for various formats

Discussion in 'Resources' started by dumptruckman, Aug 5, 2011.

Thread Status:
Not open for further replies.
  1. Offline


    ActionMenu is an API to easily create menus. So far I have 3 implementations with a 4th to come. The 3 existing are DefaultActionMenu, SignActionMenu, MapActionMenu. The default one is really ugly as it shows the menu through sendMessage() and thus will be incredibly spammy.

    Luckily it's really easy to create your own ActionMenu implementation. All you do is extend ActionMenu and implement a showMenu() method. This tells the menu how to be displayed.

    Adding menu items is also pretty simple. They need some kind of text or visual information and for you to implement the run() method. This means menu items can do whatever you want them to do.

    Currently, I'm still fleshing out the MapActionMenu but here is an example using SpaceManiac's Map API:

    And here is the very short source code to make that happen:
    (Obviously you probably shouldn't design a plugin like I did there but hopefully it conveys the simplicity of the menus.)

    I'd love some feedback so I'll let you download it and play with it now!
    ActionMenu API v.8.4-dev

    You'll have to get documentation from the source. As of now, the MapActionMenu stuff has not been documented and is still subject to great change, as is a lot of the rest of the API.
  2. Offline


    that's pretty awesome, i'll have to keep that in mind in case i ever need a menu
  3. Offline


    wow that looks super handy :eek:

    must learn faster and be able to make use of this...
  4. Offline


    @dumptruckman Wow very nice, mind if i use your source for other tests?
  5. Offline


    Please refer to the license.
  6. Offline


    First of all i just want to say,its amazing!
    The best thing i seen so far :)
    I started to use it in my servers own rpg plugin but this
    menu=new MapActionMenu(this);
    line causes me this error:
    2011-08-15 19:08:12 [SEVERE] Error occurred while enabling RPG v0.1 (Is it up to date?): org/bukkit/map/MapFont
    java.lang.NoClassDefFoundError: org/bukkit/map/MapFont
        at me.zephyr.rpg.RPG.onEnable(
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(
        at org.bukkit.craftbukkit.CraftServer.enablePlugins(
        at net.minecraft.server.MinecraftServer.e(
        at net.minecraft.server.MinecraftServer.a(
        at net.minecraft.server.MinecraftServer.init(
    Caused by: java.lang.ClassNotFoundException:
        at$ Source)
        at Method)
        at Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 11 more
    Any ideas? :)
  7. Offline


  8. Offline

    tha d0ctor

    this definitely deserves a bump
  9. Offline


    Ack, sorry, forgot about this post... checked it when I couldn't reply.
    So, are you using the latest CB that has maps included? I have not tested it on that since it was built against the map API before it was pulled into the main project. I'll double check the package names and stuff to see if they changed when they were pulled in.

    Edit: I built it on the lastest bukkit so it should work if you update CB.
  10. Offline

    Daniel Heppner

    Is this still updated?
Thread Status:
Not open for further replies.

Share This Page