[MISC] ScrollingMenuSign - scrollable command menus with many view types [BukkitDev]

Discussion in 'Archived: Plugin Releases' started by desht, May 24, 2011.

  1. Offline

    desht

    ScrollingMenuSign - scrollable command menus
    Note: ScrollingMenuSign is now on dev.bukkit.org:

    All documentation for the plugin can now be found there. General discussion for the plugin is fine here, but please use dev.bukkit.org tickets for problem reports.

    ScrollingMenuSign lets you attach a scrollable command menu to any sign or map and add menu items to it. Right-click the sign to scroll the list of items, left-click it to select an item and execute its associated command. The inspiration for this plugin was the large number of Minecart Mania station names I (and others) have to remember and type in.



    Some possible uses:
    • A menu of station setting commands for Minecart Mania
    • Newbie user guide menus
    • Warp menus for your favourite teleportation plugin
    • A shop menu - buy/sell/swap items & credits
    • Controlled access to commands that users can't normally run
    Links:
    Changelog

    See the Changelog on dev.bukkit.org
     
    HWei, bluehasia, elmoo32 and 6 others like this.
  2. Offline

    panade

    the cannot run alias comes from mchat i think, it seems to be broken with mcmyadmin atm.
    the pluginfolder of sms only contains the folder data and inside this folder i see 3 other folders: macros menus views
    the config file is missing.

    due the update of sms i deleted all old files to make it fresh.

    EDIT: using the new bukkit build :-\
     
  3. Offline

    desht

    No need to delete any files, I make sure upgrades are seamless. What OS are you running Bukkit on? It sounds like you may not have the right OS permissions to create the config.yml file, but I'll verify the code anyway.

    Update: just started my server with SMS 0.8.1 and a completely clean SMS folder (I removed plugins/ScrollingMenuSign/) and it was fine - everything got created as expected, including config.yml. And the configuration handling code hasn't really changed lately.

    Really not sure what to suggest here, I can't see a problem....
     
  4. Offline

    panade

    other plugins also create configs so its not the folder permission. im using a windows server 2008 ... dont ask :-P
    i will try it later again i will keep u up.
     
  5. Offline

    desht

    Let me guess... you were using a development build of Bukkit/CraftBukkit, and you're also using PermissionsEx?

    I just tested with the new 1317 RB, and yeah... broken behaviour like you said.

    PermissionsEx 1.14 doesn't work with CB 1317
    (broke somewhere between 1240 and 1317), and SMS doesn't check carefully enough when detecting a permissions plugin, so it gets a NPE when initialising. I'll fix that for the next release, but meanwhile...

    Workaround for now is (a) go back to 1240 or (b) don't use PermissionsEx until the author puts a new release out. PermissionsBukkit seems to be fine, and bPermissions / zPermissions may also work, haven't tested recently.

    Update: the latest PermissionsEx on the forum thread (also titled, confusingly, 1.14) works OK with 1317+, and SMS is happy again.
     
  6. Offline

    panade

    no i use the regular build from bukkit for my live system. and i use permissions bukkit
     
  7. Offline

    desht

    And you're still having problems?

    Could you send me a copy of your complete server startup log please?
     
  8. Offline

    asm0deus

    I'm having the same issue. Using CraftBukkit 1317 with superperms. Same issue, all commands just show the help menus.
    McMyAdmin and mChat.

    no errors at all in the console so can't really send you anything.
     
  9. Offline

    desht

    Not an isolated incident then :(

    Can I see your server startup log anyway please? I'd like to see at least what SMS reports on startup. The fact that no commands are working suggests that it's getting some kind of exception before it gets a chance to register the various /sms subcommands.

    (I'm testing here with CB 1317, SMS 0.8.1, and PermissionsBukkit 1.2, and it's working fine...)
     
  10. Offline

    asm0deus

    Oops. I lied, there is an error. I'm just not getting anything (error or otherwise) when I type a command in.

    2011-10-12 10:30:49 [INFO] [ScrollingMenuSign]: Detected Spout v1.0.6.449
    2011-10-12 10:30:49 [INFO] [ScrollingMenuSign]: Permissions plugin detected: Per
    missionsBukkit v1.2
    2011-10-12 10:30:49 [INFO] get nodes &SMS
    2011-10-12 10:30:49 [INFO] permissions bukkit get nodes
    2011-10-12 10:30:49 [SEVERE] Error occurred while enabling ScrollingMenuSign v0.
    8.1 (Is it up to date?): null
     
  11. Offline

    desht

    Thanks. Any stack trace following that error?
     
  12. Offline

    asm0deus


    Sorry, more info in server logs. Here's a full pastebin
    It's only valid for 10 minutes so please grab fast:

    http://pastebin.com/uxWjSDEb
     
  13. Offline

    desht

    Thank you! Think I see what the problem is now - I'm guessing you don't have any &SMS user defined in your permissions, or if you do, it doesn't have any nodes defined.

    I'll get a fix out for this soon (may be tomorrow), but in the meantime, there is an easy workaround: just add a user called '&SMS' with some dummy permission node, e.g. 'not.a.real.node', or something like that. Then when you start the server next, it'll import that node into the elevation.nodes setting, and SMS should start up OK. You can then delete that node (if you want) with /sms set elevtation.nodes - not.a.real.node leaving you with an empty setting.

    New release:
    v0.8.2 (13 Oct 2011)
    • Fixed NPE at startup if there is no &SMS permissions user to migrate nodes from.

    This should fix the problems seen by @asm0deus and @panade .


    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  14. Offline

    asm0deus

    Win! :)
     
    desht likes this.
  15. Offline

    desht

  16. Offline

    Seinna

    First of all, really awesome plugin, I love it!

    Could anyone please help me solve my problem though?

    /sms macro add bridge @n:falsebook.blocks.bridge \\You already own the bridge perk. $$$
    /sms macro add bridge "$19,10 /@perm player setperm <N> falsebook.blocks.bridge"
    /sms add bridgeperk "&e10 Sponges" %bridge

    It keeps saying "You already own the bridge perk." even though I do not have permissions for it at all >.<
    After it checks the first line, it should skip to the second line if you do not have falsebook.blocks.bridge and allows you to buy it.. however, it gets stuck at the very first line without owning the permission. =/
     
  17. Offline

    desht

    Hmm, that looks like it should work. You're using PermissionsBukkit there, right? I'll see if I can reproduce the problem...
     
  18. Offline

    Seinna

    Yes we're using PermissionsBukkit and the SuperPerm bridge thingy, I've tried like a thousand ways to get around this but I'm failing badly... ;P

    One of my attempts was this ;

    /sms macro add bridgeperk @n:bridgeperk \\You already own bridge perk! $$$
    /sms macro add bridgeperk @!n:bridgeperk \\You now own bridge perk!
    /sms macro add bridgeperk /@perm player setperm <N> falsebook.blocks.bridge
    /sms macro add bridgeperk /@perm player setperm <N> bridgeperk

    Did not work to me either, it doesn't show anything until I grant myself 'bridgeperk' throught the console, then it says I already own it. I left item cost out of that one because I thought that might have caused the problem.

    Thanks for the fast reply by the way! :)

    I'm now using

    /sms m a bridge @n:bridgeperk \\You already own the spell bridge.
    /sms m a bridge @!n:bridgeperk $19,10 /@perm player setperm <N> bridgeperk
    /sms m a bridge @!n:bridgeperk \\You do not have enough sponges for this perk.
    /sms m a bridge @n:bridgeperk /@perm player setperm <N> magicspells.grant.bridge

    Which is working perfectly fine, but as soon as I add $$$ behind the first line, the macro thinks I have the 'bridgeperk' permission and I don't and it stopts the line there, I believe there is something wrong with $$ and $$$ or I'm just doing it wrong. =/

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  19. Offline

    desht

    Ok, thanks for the detailed bug report. I'd say there is something up with SMS. It'll be tomorrow before I can do any serious debugging, but I'll definitely take a look.

    Update: I found some time to take a look, and yes there were some bugs, which I've just released 0.8.4 to hopefully fix. With this release, your original macro:

    Code:
    /sms macro add bridge @n:falsebook.blocks.bridge \\You already own that perk $$$
    /sms macro add bridge $19,10 /@perm player <N> setperm falsebook.blocks.bridge true
    
    now works well for me. It correctly detects if I already have the node, and gives me the "You already own.." message. If I don't have the node, it gives it to me if I have 10 sponges, or correctly gives me an error that I can't afford it if I don't have 10 sponges.

    (I just noticed your original macro had the second command in quotes - that won't work; it'll just make the player speak the string. But I think you may have discovered that anyway :) )

    I couldn't see a specific problem relating to the permission node being wrongly detected. Is it possible you indirectly had the falsebook.blocks.bridge permission via some parent permission?

    New release:

    v0.8.4 (23 Oct 2011)

    • Fixed error reporting if the last command in a macro led to an error, e.g. a cost was not met. Previously the error status was ignored.
    • Fixed "$$$" being wrongly picked up in a macro command if the command did not get run due a cost or restriction not being met.

    http://dev.bukkit.org/server-mods/scrollingmenusign/files/14-scrolling-menu-sign-v0-8-4/


    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  20. Offline

    Seinna

    Thank you desht, I'll let you know if it's working now as soon as I can update (currently no access to console or plugins :))
     
  21. Offline

    panade

    oh thanks for the fixes, i wasnt able to answer due i had to learn for my exams and my server got bigger system side problems and and and :-D
    i will test it as soon as i can, great work and support btw.
     
  22. Offline

    desht

    New release:
    ScrollingMenuSign v.0.9
    • New view type: Spout Views. Can create Spout views on any menu and assign a hotkey (or key combination) to each. Cascading menus (i.e. opening a submenu from another menu) are also possible. See http://dev.bukkit.org/server-mods/scrollingmenusign/pages/view-types/spout-views/
    • New view type: Redstone Views. Can create redstone views on any menu, where applying and/or removing redstone current triggers a specific command from that menu. These views have some caveats and limitations; see http://dev.bukkit.org/server-mods/scrollingmenusign/pages/view-types/redstone-views
    • Now uses Vault instead of Register for Economy and Permissions support. Register has been causing way too many problems and the author isn't active on the Register support forums.
    • Needs Vault 1.1.1 minimum. If you use PEX, you need PEX 1.16 minimum.
    • Meaning for '&&' in command sequences has changed slightly. '&&' now means execute the next command IF the last command ran OK (where it used to mean execute the next command unconditionally). E.g. "$E,100 /heal &&
      You feel great!" now behaves like you would expect it to, only sending the message to the player if they were actually healed.
    • @g:<group> command restrictor has had a reprieve - it still checks if the player is in the given group. Thank Vault's permissions abstraction layer for that.
    • No longer auto-migrates permission nodes from the &SMS user into the elevation.nodes setting. This means that upgrading from 0.7 direct to 0.9 wouldn't pick this information up automatically. So if upgrading from 0.7, I recommend to upgrade to 0.8.4 first, then to 0.9. If you're upgrading from 0.8.x, there should be no problem.
    • Maps should now render correctly (i.e. per-player) when multiple players are looking at the same map view.
    • 'use_any_view' setting is now called 'ignore_view_ownership', a more accurate description of what it does. It will be auto-updated in your config file. Similarly the 'scrollingmenusign.useAnyView' permission is now known as 'scrollingmenusign.ignoreViewOwnership' (although the old node name will continue to work for now).
    • API: runCommandString() is deprecated - use runCommand() instead. The return value is much more informative now.
    • API: SMSScrollableView scrollUp(), scrollDown(), getScrollPos(), setScrollPos() methods which don't take a Player parameter are deprecated. Use corresponding method calls which take a Player parameter.
    • Using the new Bukkit Configuration API. CraftBukkit 1337 is required.
    • Now uses Maven to build the project.

    Get it at http://dev.bukkit.org/server-mods/scrollingmenusign/files/15-scrolling-menu-sign-v0-9/
     
  23. Offline

    Waffletastic

    For the maps, do you have to use that certain command to give them out, or is it possible to have them distributed on player respawn?Because I would love that!
     
  24. Offline

    desht

    You'd need to use the /sms givemap command explicitly, I'm afraid. Although the idea of auto-handing out items on respawn is an interesting one... I wonder if there's another plugin which can do that.
     
  25. Offline

    Waffletastic

    Yeah I know you can give out items on spawn with other plugins, but I'm wondering does map 0 for example always have the commands on it? Or only when you spawn it with /sms givemap.
     
  26. Offline

    desht

    Always - it doesn't matter how you get a copy of the map (e.g. "/i map:0" from the General plugin will also work).

    And you can always find the map ID that's used by the menu with "/sms list", e.g.
    Code:
    /sms list mymenu
    * mymenu "My Menu" [1 item] [1 view]
      * mymenu-1: map id: 2
    
    So in that case, doing "/sms givemap 2" (or "/i map:2" or whatever) will give you a map with ID 2 showing the contents of "mymenu".
     
  27. Offline

    Waffletastic

    Is it possible to have a background accompany the commands on a map?
     
  28. Offline

    desht

    No, but that's a future possibility. How would you envisage that working? What sort of background (do you mean just a regular map showing your surroundings) ?
     
  29. Offline

    Waffletastic

    Well with banana map loader we have tickets for different transportation as maps, and the maps have images on them, and it prints the players name onto the picture, here let me give you an example. http://img196.imageshack.us/img196/5454/arvinatrans5.png Is a picture of one of our tickets. Now we would like to have scrollable command menus, but would like to have some decoration behind or beside it.
     
  30. Offline

    desht

    Thanks. I could add an option to specify an external file (probably in PNG format but I'd need to research what formats are easily loadable) as a background image for each view. Can you do me a favour and create an enhancement request here?
     
  31. Can you make simply plugin for only writing on maps?
     

Share This Page