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

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

  1. Offline


    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.

    • 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

    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

    • 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:

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

    With MyWarpMenu

    (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
    See this example file, for the syntax.
    Syntax [Key in Uppercase]=/command
    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


    No worries :)

    And what do you mean obfuscated minecraft? (it's obfuscated by default... ?)
    My MCMenu.zip contains the obfuscated class files. (But the .java files are stored on git un-obfuscated...)
  3. Offline


    I tried to run your MCMenu.zip and it didn't work.
    So I thought it was because you haven't got obfuscated the sources.

    I opened your not obfuscated version obfuscated it myself and it works :D (?maybe the obfuscating proccess changed during the version update?)
    23.5.2011 10:44:10 ModLoader addMod
    java.lang.NoSuchMethodError: mz.<init>(Ljava/lang/String;I)V
        at mod_MCMenu.<init>(mod_MCMenu.java:26)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at java.lang.Class.newInstance0(Unknown Source)
        at java.lang.Class.newInstance(Unknown Source)
        at ModLoader.addMod(ModLoader.java:201)
        at ModLoader.readFromModFolder(ModLoader.java:1018)
        at ModLoader.init(ModLoader.java:740)
        at ModLoader.AddAllRenderers(ModLoader.java:120)
        at sd.<init>(sd.java:60)
        at sd.<clinit>(sd.java:9)
        at net.minecraft.client.Minecraft.a(SourceFile:282)
        at net.minecraft.client.Minecraft.run(SourceFile:658)
        at java.lang.Thread.run(Unknown Source)
    Edit: Indeed I checked both sources and they are differently obfuscated. Well my version works with Modloader v4, Minecraft 1.501
  4. Offline


    Ah cheers for that, mine should work with Modloader v5 and 1.5_02 (though maybe only _01).

    I haven't checked it in a while...

    When I have a day free I also intend to allow users to configure arbitrary keys for custom commands :)
  5. Offline


  6. Offline


    Heh wow...

    ModLoader B1.3_01v5.zip

    Cheers for updating it.
    I'll just link to your copy in the main thread for now, if that's cool with you?
  7. Offline


    Sure, do what you need with it. You should reupload it to your server as well.
    This is awesome and simple plugin.
    I have already made some menus for teleporting (select user select other user and it teleports) and slapping (select user and set power). I may as well add some other stuff, make it configurable and then publish it.
  8. Offline


    Sounds good :)
    And cheers :)
  9. Offline



    MCMenu client mod, has been updated to allow for configurable shortcut keys.

    Eg: K=/qm
    In the properties file. (Not generated yet... the folders are created, but an empty config file is not...)
    Copy & Paste from the example file.

    A few keys don't work (Control and Alt etc), Letters should all work though... (And I don't recommend using numbers :p)
  10. Offline


    I like the idea of this still but i had issues getting any thing to work before and idk it may be faster just to type my commands out. not to mention i already have far to many plugins to keep track of i prob have errors jumping out every where in my server log and no real idea whats causing them Log file is a pain to view due to the way my host is :/
  11. Offline


    You're referring just to the client mod?

    What is the error / what wasn't working?

    And with this new client mod, you'll be pushing a single character instead of t, followed by the command (which can be quite long)
  12. Offline


    no server side none of the text menus would work that i made or any thing. never got around to trying the client due to the server side not working.
  13. Offline


    Depends on the error.. But .yml needs spaces not tabs.

    If you want help just send the stack trace and config file.

  14. Offline


    Dude i edited my permissions for months by hand I know i had no yml errors unless the format in the file is really weird..... Maybe ill have a play with it later on my local serverr

    what would be really handy is being able to get around permissions like use a command you dont have permission for. so i could allow a player a menu filled with the locations of guides and let them use say /tp x y z

    Not sure how you would go adding some thing like that you would have to grant the player the permission line: - *
    Long enough to run the command and then remove it all with out screwing the yml up and not to mention that they might not be in the file already. would be alot of work but a really cool feature to have
  15. Offline


    Heh cools :)

    Yeah I don't think a work-around for permissions is a good idea :p

    And I don't think you CAN do that (does permissions allow granting permissions at run-time, or only in the config file?)

    In any case, that is out of the scope of this set of plugins
  16. Offline


    Should be at run time to allow that kind of thing would have to check it Still that would be really handy cause i dont want my players going all over the map with tp if i could limit it to just some places that would be win. I have no warps plugin because we never used it. we are all close in the city and mostly walk.
  17. Offline


    Lol this is off topic.

    Find a warp plugin that supports public / private destinations.

    Make it so only you can create destinations. Make the destinations you want public "public".
  18. Offline


    hey um i have one problem / suggestion for value menus i can only pass integer parameters not strings
    so when i have a command that i need to pass say the name of another player i cant....
    i want to use this for my economy system on my server if like my users to say use a menu to manage everything command less mostly
    say the can select from a menu 2. Pay Another Player [playername] [amount]
    all they have to do is type 2 then type the playername and amount and it would execute the command
    /money pay [theplayername ] and [amount]
    here is my config file

    #------- First Menu - also accessible via /quick
    # Menu Title:
    #Menu Type
    type: Menu
    #Command to open the menu e.g. /quick menu1
    command: main
    # Menu Option List
    # Option Text : Option Command
    Economy cmds : /qm economy
    Landmark cmds : /qm landmark
    #------- Second Menu
    # Menu Title:
    economy cmds:
    #Menu Type
    type: ValueMenu

    #Command to open the menu e.g. /quick menu2
    command: economy

    # Question to ask after option # has been chosen
    question: Please Enter Data!
    # Menu Option List
    # Option Text : Option Command
    Pay A Player [Playername] [Amount] : /money pay
    Open Bank account [Account Name][Your Username] : /account open
    Bank Account info [Account Name] : /account info
    Deposit Money [Account Name] [Amount] : /account deposit
    Withdraw Money [Account Name] [Amount] : /account withdraw

    #------- Third Menu
    # Menu Title:
    landmark cmds:
    #Menu Type
    type: ValueMenu

    #Command to open the menu e.g. /quick menu2
    command: landmark

    # Question to ask after option # has been chosen
    question: Please Enter Data!
    # Menu Option List
    # Option Text : Option Command
    Set Landmark Type [Icon Name] : /landmark type
    Add A Landmark [Landmark Name] : /landmark set
    Remove Your Landmark [Landmark Name] : /landmark remove

    id like to append the next string of text at the end of the cmds so i can pass parameters other than ints

    "Client Side works with Value Menu. And only allows numerical inputs (without client mod you can enter whatever you want.. and the command will be executed with that suffix)"
    i don't know if this was um, backwards but it dose not seem to do this and if this is stated backwards, it would be nice to see it implemented into the server plugin

    id be nice to turn of the ? and > function as well, because many of my users ud just ? storta as a short what or what do you mean when there in chat

    those changes would make this mod 150% better and would help make peoples servers command less for there users. especially for servers that have so many plugins that require users to remember so many commands

    thank you and srry for the long post
  19. Offline


    Hey DetCox,

    So you are not using the client mod, and you cannot enter "PlayerName Amount" as the response to a value menu?
    That is weird....

    In any case this weekend I'll get rid of '?' and '>' and remove the number-only limit for value menus in the client mod.

    A cooler / better idea that I don't have time for is a 'PlayerMenu' type, which automatically produces a menu with player names, so you could:
    1. Menu 'Send Money to Player'
    2. PlayerMenu 'Select Player'
    3. ValueMenu / something? 'Enter value amount'
    (two quick button pushes then the value... that would be cool... meh for now)

    Cheers for feedback :)
  20. Offline


    hey thanks
    and no i am not using the client mod (i try my best to keep my users from having to install client mods) thanks for removing those and could you look into the server-side parameters problem it'd help a lot
    again great plugin cant wait! :)
  21. Offline


    Version 0.6 of MenuMetaMod released

    Mostly a tidy up, but important change:
    Any input can be used with a value menu
    Not just numbers anymore

    Client mod also updated to allow strings

    Test code removed and code tidy up in both.

    Enjoy :)
  22. Offline


    um hi i don't know if this is a broken link or githubs problem but when i go to download i get

    This XML file does not appear to have any style information associated with it. The document tree is shown below.
    <Message>Access Denied</Message>
  23. Offline


    i can't download it >_>
  24. Offline


    Yeah git hub does that sometimes :(
    Usually it just takes some time for the file to be accessible.
    But the following work for me:



    And this doesn't work yet:

  25. Offline


    Client side MCMenu updated for 1.7.3

    Tested and working
  26. Offline


    Hi sorry i haven't posted any feedback, i have been working on my server. your plugin works great! really nice as my users do not have to remember all of the cmd's for reach plugin.
    i just have one feature request: a way to cancel the /qm cmd, similar how next page is appended to the end of the menu list could you add a cancel option that is appended to the list using another character (maybe -, =, or ~/`) to both cmd menus and value menus.
    another future feature you may want to add is the ability to execute multiple cmd's
  27. Offline


    Oh yeah sure... maybe just use '0' (zero) on the last "page" for cancel (and always have it...)
    That's easy enough and I'll add it today or tomorrow.

    Multi commands should be easy enough... ';' (semi-colon) seperated command: in the .yaml file.
    I'll also add that when ever I make the other change...

    Cheers for feed back :)
  28. Offline


    POW! Version 0.7
    as requested [by DetCox]
    Allows multiple Commands per menu option (';' separated)
    Adds a Cancel menu option to all menus
  29. Offline


    Version 0.8
    • First version using Spout (someone else please let me know how it works for you)
    • I had it working without SpoutCraft (The modded Client)... but I must have broken it
      • Meh tomorrow
  30. Offline

    Don Redhorse

    nice you keep it updated... btw: did you ask some developers to perhaps use it?
  31. Offline


    Nah I haven't asked yet, but once the Spout aspect of it is polished a bit more I'll get it added to the official SpoutPlugins list... then it should get more use :D

Share This Page