[DEV/GEN] MenuMetaMod v0.8 - Client Menu Framework [1240]

Discussion in 'Inactive/Unsupported Plugins' started by GarethNZ, Mar 19, 2011.

  1. Offline

    GarethNZ

    Moved to http://dev.bukkit.org/server-mods/menumetamod/

    Show Spoiler


    MenuMetaMod - Client Menu Framework:
    Version: v0.8
    This plugin aids client server communication by providing players with numbered menus. It is designed to be used by other plugins, and also supports server-side yml configured menus.

    Features:
    • Send Menu to Client
    • Handle response, i.e. make player execute a command
    • Menu with Value parameter after selection: command is then executed with the parameter as a suffix
    • yml Config file to determine menu contents
    Download: MenuMetaMod.jar
    Requirements: Spout

    Outdated - Sample Plugin (Menu for MyWarp) MyWarpMenu.jar, requires MyWarp
    Source Code

    Changelog:
    Version 0.8
    • Initial version using Spout
    • Misc code tiding
    Version 0.7
    • Allow multiple commands for menu options ';' separated
    • Static 'Cancel' Menu option ('0' on last page)
    Version 0.6
    • Allow any text for valuemenus
    • Removed some test code
    Version 0.5.1
    • Everything inc MCMenu updated to 1.4_01
    • Changed quick menu command to /qm
    Version 0.5

    • Added configurable menus (based on comment from RustyDagger)
    • Bug fixes
    • Updated to CB 612
    Version 0.4

    • Bug fixes (updated bukkit)
    Version 0.3

    • Added Value Menu, for parameterized commands
    • Bug fixes
    Version 0.2

    • Pages managed for > 10 options / commands
    Version 0.1

    • Options are numbered 1-9,0
    Future

    • Multiple .yml files , for easy sharing of /qm 'filename'
    • Remove All the printlns (add 'debug: true' config option)
    • Parametrise config options such as "%p" = Name of the calling player.
    Example usage

    Show Spoiler
    Show Spoiler

    MenuMetaMod.sendMenu(player, new MetaModMenu(title, optionText[], commands[]) );
    // optionText = String[] of Option Titles
    // commands = String[] of Commands to execute on selection

    When the player chooses an option, the plugin makes the player execute the command at the same index in the commands array. (eg. "/warp spawn" is executed)

    For a full implementation See ~line 100 of MyWarpMenu.java, which gets a list of the warps available to the player, creates the arrays, and sends the menu.


    Config file usage
    Show Spoiler
    Show Spoiler

    On first launch, the plugin will create an empty config.yml in the plugins/MenuMetaMod/ dir.
    Fill it up with content, following the syntax of the example file: Sample config.yml

    Menus will be sent to the user following the command:

    Code:
    /qm ('command' in config.yml)
    e.g.
    /qm menu1
    
    the command
    Code:
    /qm
    will send the 1st configured menu



    Screenshots
    With MyWarpMenu
    [​IMG]


    (Obsolete) Client-Side Mod
    Show Spoiler
    Show Spoiler

    The purpose of this was to enable quick Client side responses as well.
    I have also developed a client side mod available at
    ClientSideMod-MCMenu - ModLoader Beta 1.7.3

    Client Side works with Value Menu.


    Client Side tells the server it is installed on join. (buggy at the momment)

    [21/06] Updated for MC 1.7.3
    [21/06] Updated to allow any string as input to ValueMenu
    Show Spoiler

    Configuration stored in
    .minecraft\mods\MCMenu\guiconfig.properties
    See this example file, for the syntax.
    Syntax [Key in Uppercase]=/command
    EG:
    Pushing the 'k' button calls the command "/qm" giving you the first configured menu.

    [25/05] Updated to allow configurable buttons with commands




    ClientSide Video
    Show Spoiler






     
  2. Offline

    Don Redhorse

  3. Offline

    Grifhell

    Nice plugin, but
    Code:
    03:09:14 [SEVERE] Error occurred while enabling MenuMetaMod v0.8 (Is it up to da
    te?): org/getspout/spoutapi/event/input/InputListener
    java.lang.NoClassDefFoundError: org/getspout/spoutapi/event/input/InputListener
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClassCond(Unknown Source)
            at java.lang.ClassLoader.defineClass(Unknown Source)
            at java.security.SecureClassLoader.defineClass(Unknown Source)
            at java.net.URLClassLoader.defineClass(Unknown Source)
            at java.net.URLClassLoader.access$000(Unknown Source)
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    java:36)
            at org.bukkit.plugin.java.JavaPluginLoader.getClassByName(JavaPluginLoad
    er.java:219)
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    java:32)
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    java:24)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at com.shawlyne.mc.MenuMetaMod.MenuMetaMod.onEnable(MenuMetaMod.java:145
    )
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader
    .java:920)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    r.java:278)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:173)
            at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:156
    )
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:297)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:284)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:152)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:348)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    Caused by: java.lang.ClassNotFoundException: org.getspout.spoutapi.event.input.I
    nputListener
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    java:36)
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    java:24)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            ... 26 more
    Verified Java say me
    "You have the recommended Java installed (Version 6 Update 27)."
     
  4. Offline

    GarethNZ

Share This Page