[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

    desht

    How do you mean? Not sure I understand...
     
  3. For example: you write /mapwrite Blah blah blah... And map on which you hold show Blah blah blah ... Your plugin is great, but it has too much complicated permissions. I want write only text on map and other user can read it with 2 sipmly permissions "write" "read". It's simply plugin, but i can't program in Java and don't know Bukkit API etc. And sorry for my bad English.
     
  4. Offline

    desht

    OK... sounds like you need a different plugin. SMS is for creating command menus which can be displayed on a variety of views, of which maps are just one kind. Yeah, it's a complex plugin, but it's also a highly flexible one.
     
  5. Last question: If I need something like "building permit" or "ticket" I create menu with these titles and menu item "What is it?"(with binded command to help). I create map view and how permissions I must give to players for only reading and using, but not changing this maps/tickets? Your tutorials for plugin states many permissions for similar things.
     
  6. Offline

    desht

    To allow use of a map view, you can give users either:
    • scrollingmenusign.user and scrollingmenusign.use.map
    or
    • scrollingmenusign.poweruser (but this will also give those users access to spout views - you may or may not want that)
     
  7. Offline

    desht

    New minor release:
    ScrollingMenuSign v.0.9.1
    • Works with CraftBukkit 1.0.1-R1 (aka build 1597)
    • Tested with Spout 644 & SpoutCraft 928, but see notes & caveats below.
    • Worked around problem in dev releases of Spout (only dev releases work with 1.0.1-R1 of CraftBukkit) where NPE's are thrown when setting item names. NPE's are caught and a message like "10:02:30 [WARNING] [ScrollingMenuSign]: Caught exception while setting item name for Spout: class java.lang.NullPointerException" will be shown.

    No new functionality, but if you use Spout at all, you'll want this. Spout functionality isn't perfect right now (see caveats in link below) - I'm waiting on a couple of Spout issues to be resolved before doing a new major SMS release.

    http://dev.bukkit.org/server-mods/scrollingmenusign/files/16-scrolling-menu-sign-v0-9-1/
     
  8. Nice that you still support the plugin @desht ! And again, many thanks for the map help! (If you still remember me ;) ) My plugin is going the right direction and menu's on the map is the key ingredient! I also see that your having troubles with Spout. That's one of the reasons I'm not (just yet) implementing Spout in mine. Your just too depended on the other party's.

    Just want to ask. Do you have some kind of import for PNG's in it?
     
  9. Offline

    desht

    SMS is still very much supported, and yes I do remember you - glad to hear your plugin's coming along well. Looks pretty cool from the screenshots :)

    Import for PNG's - do you mean for maps? If so, yes in the development version: https://github.com/desht/ScrollingMenuSign - check out https://github.com/desht/ScrollingM...desht/scrollingmenusign/views/SMSMapView.java (see loadBackgroundImage()) and https://github.com/desht/ScrollingM...rollingmenusign/views/map/SMSMapRenderer.java

    As for Spout... yeah, there are some kinks to be worked out, but it's getting there :)
     
  10. I was just wondering about the PNGs. How did you implement transparency? Or didn't you?! :) I've been working with a workaround parsing through every pixel and not printing the transparent ones on the map. (The question/exclamation mark for example.)

    Edit: Also the map colors... Arghhh! Why only those! Black is not even supported! :D
     
  11. Offline

    desht

    I didn't implement transparency :) Although it's something I want to look at - I only added the image loading code yesterday. And yeah, no black... there are certain... limitations to the map API :)
     
  12. Offline

    Wiinick

    Tried it and nothing happened, it made the sign with &4menu1 but /sms add &4menu hello didnt work or any other form of the command, besides ur commands are huge, simplify them.
     
  13. Offline

    desht

    "/sms add &4menu hello" isn't a valid command. Have you gone through the quickstart guide, or read the documentation for the commands on BukkitDev? It's all documented in detail there.

    You need to do something like "/sms add <menu-name> <item-name> <command>", where <menu-name> is the name of the menu you created with "/sms create ...".

    And if you can suggest a simplified set of commands which maintain the same functionality, I'd be most interested to hear about it.
     
  14. Offline

    Wiinick

    • /sms create name title - create a new menu /sms add Name Title
    • /sms create name from other-name - create a new menu as a copy of an existing one /sms copy Name of Name
    • /sms break- remove a sign from an existing menu /sms remove
    Those seem to be the "long" ones. Just a suggestion
    Thanks for clearing it up.
     
  15. Offline

    Kid Tiger

    So, the problem I'm having is I have two groups, Builder and Tourist.. The Tourist do not have permission to build and the Builders do. We are trying to get it so that both groups can scroll and execute the signs, but not create. Here is a copy of my permissions for Tourist and Builder

    Code:
    Tourist:
        default: true
        permissions:
        - essentials.kit
        - scrollingmenusign.scroll
        - scrollingmenusign.execute
        - scrollingmenusign.execute.elevated
        - essentials.kit.tourist
        - essentials.list
        - essentials.motd
        - essentials.rules
        inheritance: []
        info:
          prefix: '&7'
          build: false
          suffix: ''
    Code:
    Builder:
        default: false
        permissions:
        - essentials.afk
        - stab.exempt
        - essentials.back
        - essentials.chat.color
        - essentials.chat.shout
        - essentials.compass
        - essentials.depth
        - essentials.home
        - essentials.ignore
        - essentials.me
        - essentials.msg
        - essentials.sethome
        - essentials.warp
        inheritance:
        - newbie
        info:
          prefix: '&2'
          build: true
          suffix: ''
    The following plugins are what we have, Essentials, Voxel, STAB and Vault

    The PROBLEM is that the Builder can scroll and execute and NOT create, like we want, however the Tourist can't do anything except scroll WITH THE MOUSE WHEEL ONLY, caps for emphasis on possible bug for your purposes.
    We've tried every possible combination that we can think of with the scrollingmenusign. permissions for each group. What is going on?
     
  16. Offline

    desht

    So how would you go about shortening them?
    • The first is pretty much necessary (also be aware that you can shorten any subcommand to it's shortest unique spelling, e.g. "/sms create ..." can be written as "/sms c ..."
    • The second I may well drop because it's not very useful (it dates all the way back to 0.1 when you couldn't have multiple views on one menu).
    • The third isn't really that long, and again can be shortened to "/sms b". "/sms remove" is already used for removing menu items from a menu. I admit there's potential for confusion there since there are two things that can be added or removed - add/remove views to a menu, and add/remove entries to a menu.

    What perms plugin are you using here - PEX?

    I don't see any explicit permissions listed for the Builder group - what's being inherited from "newbie"?

    The permissions for Tourist look fine, I really can't see a problem there. I'll try to reproduce your problem, but can you let me know which perms plugin you're using (and the version), and send me a full copy of your perms config (feel free to leave out all the usernames, I just need to see all the group definitions). Also the version of SMS and CB would be useful.

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

    Kid Tiger

    What's CB? The version of SMS I believe is the latest. I just downloaded it two days ago. No plugins to allow for mouse scrolling. That's vanilla right there.

    I'm at work right now. When I get home I'll paste the entire config. Any chance I can invite you on our server to help us out?
     
  18. Offline

    desht

    CB = CraftBukkit.

    Mouse scrolling doesn't need any separate plugin - rolling the mouse wheel sends a ItemHeldChanged event in vanilla Minecraft/Bukkit, which SMS intercepts. I am puzzled as to how mouse wheel scrolling works though, when right-click doesn't work - it goes through the same bit of code to check if the player is allowed to scroll...

    Something else you could do when you get a chance is to enable debugging (/sms debug) and see what gets reported when players from the Builder and Tourist group try to interact with the menu. Recommend to do that on the console - easier to cut & paste the debug messages that way.

    Feel free to PM me your perms config (but as I said, you can leave out user details if you prefer) and server IP. I'll try to make some time to log in, though I can't make any guarantees as to when...
     
  19. Offline

    Wiinick

    There ya go.
     
  20. Offline

    desht

    New release:
    ScrollingMenuSign v1.0.0
    • Works with CraftBukkit 1.0.1-R1 (aka build 1597)
    • User variables. Set with "/sms var <name> <value>", use in commands with " ... <$name> ... "
    • Prompted variable in commands. "... <$:Type in a value> ... " will display "Type in a value" to the player, and the next thing typed in chat will be subsituted into the <$:...> string.
    • Spout views now use the native Spout ListWidget instead of a stack of Buttons.
    • Map views can now have an image background (see the "imagefile" view attribute).
    • Permission changes to parent nodes (which give a bunch of low-level permissions)...
    • New "scrollingmenusign.guest" node which allows the most basic menu usage, no access to permission elevated commands
    • "scrollingmenusign.user" node no longer gives access to /sms list, /sms show or /sms get
    • "scrollingmenusign.poweruser" gives access to the above commands (as well as access to map and spout views)
    • "scrollingmenusign.admin" is unchanged
    • If player lacks permission to do something, SMS no longer reports the node needed. Regular players don't need to see that. If you're debugging as an admin, /sms debug will show permission node checks.
    • Map and spout views now display the menu item feedback text (if any), same as for signs.
    • Maven: fixed group ID for Vault, updated artifact ID for spoutapi (now spoutpluginapi)
    • Added author/website/description fields to plugin.yml
    • Explosion/physics/damage protection now works for all block types - redstone views are now properly protected.
    • General cleanup: tracked down several NPE's and places where memory could have leaked.
    • Command logging: it is possible to log all commands run by users to either the console or a configurable log file under the plugin folder
    • Dropped support for the "/sms create <menu1> from <menu2>" syntax - it isn't needed when multiple views on a menu are possible
    http://dev.bukkit.org/server-mods/scrollingmenusign/files/17-scrolling-menu-sign-v1-0-0/

    Docs are not fully up to date yet, expect updates in the next couple of days:
    • New parent permission nodes: documented
    • Command logging: documented
    • Map view image backgrounds: not documented yet done now
    • User variables, prompted variables in commands: not documented yet done now
     
  21. Offline

    panade

    mhhh i have a suggestion, maybe is it possible (if not overseen the implementation by me) to remove or at least view single users from limited use signs?

    i mean there is a function to reset the menu completely but i dont want the other users to be able to use it again. so removing single users maybe with a config or database entry would be nice. but i dont even know where this stuff is saved o.0
     
  22. Offline

    desht

    Yeah, good idea. I'll put it on my to-do list.

    In the meantime, you can edit the files under plugins/ScrollingMenuSign/menus/ - usage limits are stored along with the menu definitions. The format should be pretty obvious (it's all YAML) but let me know if you have any problems.
     
  23. Offline

    panade

    omfg ^^ i looked at that file but i oversee the most obvious part. XD maybe next time i frist drink my coffee before complaining.

    btw i have a problem with charging money from users. the "$E,50 /@whatervercommand" seems not to work for me o.0
    but im still using iconomy 5 with register. is this a problem? do i need to activate it somewhere?
    didnt found something on the page at bukkit dev
     
  24. Offline

    desht

    Register hasn't been supported for quite some time now (because it's an inactive plugin and broken in some fundamental ways). As of v0.9 of SMS, you need to have Vault installed.
     
  25. Offline

    panade

    thank you so much :D u saved my day.
    i didnt knew about this vault plugin, you should make a info on the page where u explain the economy functions.
     
  26. Offline

    desht

  27. Offline

    panade

  28. Offline

    paully104

    @desht i wrote a ticket on the Bukkitdev however i noticed a previous user was having issues with permissions and so am i. However in my case i am the admin on my server i have OP status and in PermissionsEx i have '*' indicating the ability to use all commands. I am writing a sign using your new variable system using the format /sms add Mail "Send Mail" "/post <$:Username> <$:Message>" and when i hit enter it says you do not have permission. I added the scrollingmenusign.admin to the admin section even though admins have the * node already, didn't work. I then added it under my username, which also already had the * node. I've even added every permission you have on the wiki and it still said "you do not have permission" It does not create an error in the log. However i can run debug mode if you would like or send my permission file. However it seems that PermissionsEx or the plugin is not communicating properly.
    tl:dr Reading is good for you.
     
  29. Offline

    desht

    @paully104 thanks for the report. There's definitely something up with PEX support, and I'm trying to get to the bottom of it. /sms debug output would be useful.

    Can't guarantee a super quick fix, sorry - limited computer time due to Xmas break... but I'll do what I can.
     
  30. Offline

    paully104

    I think i found the source somewhat, unfortunantly i had to take a picture due to /sms debug not outputting to the console or to a seperate log file. [​IMG]
     
  31. Offline

    desht

    @paully104 thanks, I can reproduce that problem - confirmed bug in SMS. I'm putting a fix together now (checking creation perms for commands that need variable substitution is buggy).

    There are still problems with PEX and how it seems to load parent/child nodes (i.e. it doesn't) but at this point I believe that's a problem with PEX. I've asked some questions in the PEX forum thread, but no definitive answer yet. The workaround for now is to give scrollingmenusign.* to admin users, and the specific nodes you want to players (they're listed in the docs page at http://dev.bukkit.org/server-mods/scrollingmenusign/pages/permissions/). For normal users, you probably want to grant:
    • scrollingmenusign.scroll
    • scrollingmenusign.execute
    • scrollingmenusign.execute.elevated (if you want to allow them to use permission-elevated menu entries)
    and maybe:
    • scrollingmenusign.use.map
    • scrollingmenusign.use.spout
    (By the way, if you run sms debug on the console, the debug output goes to the console :) )

    New bugfix release:

    v1.0.1 (28 Dec 2011)
    • Fixed problem with permissions checking when creating commands with interactive variable substitution (i.e. <$:name> strings)
    • Fixed problem with recursive calls if command with interactive variable substitution was a chat command
    • Output of /sms debug permission checking now shows the outcome of the permission check
    http://dev.bukkit.org/server-mods/scrollingmenusign/files/18-scrolling-menu-sign-v1-0-1/

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

Share This Page