[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

    chisox8

    Well that did not happen...

    They both showed what they were supposed to... so is it a Spawn Protection thing? (even though i'm an Op?)
     
  3. Offline

    desht

    Only other thing I can suggest is to try placing a sign far from spawn and see what happens then. Otherwise I'm a bit puzzled about the cause - can't reproduce it at all.
     
  4. Offline

    chisox8

    I just tried that... no help. Maybe its a confliction with another (sign) plugin? Signshop? Stargate? CommandSigns? (although its made to work with that) Any thoughts?? (and try to fix in next version?)
     
  5. Offline

    desht

    Can you list all the other plugins you're using? And if you have a chance, try running with only SMS active?
     
  6. Offline

    chisox8

    That would be a huge pain... i'll try it at some point. But for now, my list of "Things to do" is too long...
     
  7. Offline

    Ryan Phox

    How would one charge for the use of a sign using macros?
    I try with the first line of the macro being $;0,300 so to charge 300 for the use of the sign and the second macro line being the command using /@command, it said I don't have enough money (which is correct as I had 298) and yet it still did the command.. How can I pull this off, or is this yet not possible?
     
  8. Offline

    desht

    Macros are run as a series of independent commands, so that doesn't work, as you discovered. I haven't tested, but putting the cost and command on the same macro line should work.

    Fair enough :) But if you can get me a list of the plugins you use, I'll see if I can work out if any are causing conflicts.

    Oh, one other thing - was it a cold server restart or a /reload that triggered the problem?

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

    Ryan Phox

    I haven't seen anything showing how to combine things on a single line, how does one separate the commands?

    Edit: Nevermind, I got it to work!
    I used:
    $;0,600 /time noon
    With $550 it said I do not have enough and did not follow through with the command, but when I had over $600 it let the command run.

    Thanks a bunch!
     
  10. Offline

    gameswereus

    I can't get it to work :( I get an error in the chat "menu-entry must include at least entry label & command" Well I thought that I added all those things, following the video tutorial down to the last space. Is it conflicting with another plugin? Thanks :p
     
  11. Offline

    desht

    What is the actual /sms add command you're using? Have you been through the "Quick Tutorial" guide (not the video review, but the one in a spoiler section)?

    Usual syntax would be /sms add Label|Command|Message or just Label|Command (or even Label||Message - note the empty second field there).

    The important thing is the '|' field separators. There have to be at least two fields - the label and the command. The third field, the feedback message, can be left out (e.g. if the command you're running already gives a feedback message, you probably wouldn't want another message from SMS). The command can be blank, but that's only really useful if the message isn't blank - e.g. an info entry on the menu might give some useful instructions but not actually run any command.

    (And the separator might be different if you're changed it yourself - see /sms setcfg menuitem_separator ... - but I'm guessing you probably haven't changed it?)

    I appreciate this is probably one of the least clear aspects of this plugin - if anyone has any suggestions to make it clearer, better documented, please let me know :)

    New release 0.4:

    v0.4 (13/6/2011)
    • CraftBukkit RB 860 tested and supported now. RB 803 no longer supported (still likely to work, though).
    • If CommandsSigns is in use, we now require CommandSigns v0.8.7 minimum (recommended 0.8.11).
    • Tested with Permissions 2.7.4 and 3.1.5b.
    • If there is a syntax error in the YAML for scrollingmenus.yml or commands.yml, a backup is now made. This avoids the situation where they may be overwritten by an empty file, losing a lot of work. Check your server logs to ensure the files are successfully loaded.
    • It is now possible to remove menu items by label as well as index (e.g. "/sms remove mymenu label1")
    • New config item "autosave", true by default. When true, menus are saved to file after every change. When false, they are saved only on server reload/restart or explicit "/sms save" command.
    • New config items "no_physics" & "no_explosions" to protect menu signs from physics events (being broken off a wall/floor) and explosions. Both false by default, enable them if you don't want signs being broken at all. See Config for more details.
    • New config items affecting global menu display: "item_justify", "item_prefix.selected", "item_prefix.notselected". See Config for more details.
    • "/sms break" command can now take location of the sign to remove on the command line, e.g. "/sms break 100,65,-50,world". world is mandatory if on console, optional otherwise.
    • Feedback messages from signs can now be coloured (usual &X syntax) and may also use macro expansions like commands do. This may be useful if you want to display extended help text when clicking an entry.
    • If scrollingmenus.yml is edited directly and reloaded (/sms reload), any menus that you deleted in the file will now disappear properly from in-game (previously they stayed in game even though missing from the saved file).
    • The field separator string for /sms add is now a string literal, not a regular expression. Regexps are just unnecessarily complex for this simple application. The default separator in config.yml is now just '|', not '\\|' - this will be auto-updated in your config if necessary. No user intervention needed.
    • Added /sms debug command to help track down problems. At the moment, only events are logged.

    @chisox8, if you can install SMS v0.4 when you get a chance, and do /sms debug, that would be helpful. I'd recommend doing that on the console, it will be much easier to cut & paste debug messages from there.

    I'm particularly interested to see what player-interact & block-damage events you see when you left-click signs.

    Update: something occurred to me - how are you creating the menus & signs? With the /sms create & /sms sync commands, or by placing signs with [sms] on them and punching them?

    Glad it's working for you. The ability to detect if a cost check failed in a macro could be quite useful, though. I can't do it right now, because the CommandSigns API doesn't currently provide a way of testing if the last command run was forced to halt or not. I've raised this as a talking point over in the CommandSigns thread, however.

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

    Ryan Phox

    I did find issues doing more then one command, it seems that $;0,600 /command1 /command2 yeilds only command2 being done and command1 is ignored which I think is a bit odd.
     
  13. Offline

    desht

    That's probably one to ask about in the CommandSigns thread... or at least create a standalone CommandSign to test it with first.
     
  14. Offline

    paste120

    This is awesome. Amazing work!
     
  15. Offline

    Metalcat

    When I start the server I get this error:
    Code:
    2011-06-23 15:30:37 [SEVERE] java.lang.IllegalAccessError: tried to access class com.nijiko.permissions.ModularControl$RefreshTask from class com.nijiko.permissions.ModularControl
    2011-06-23 15:30:37 [SEVERE]     at com.nijiko.permissions.ModularControl.<clinit>(ModularControl.java:45)
    2011-06-23 15:30:37 [SEVERE]     at com.nijikokun.bukkit.Permissions.Permissions.setupPermissions(Permissions.java:184)
    2011-06-23 15:30:37 [SEVERE]     at com.nijikokun.bukkit.Permissions.Permissions.onLoad(Permissions.java:139)
    2011-06-23 15:30:37 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:112)
    2011-06-23 15:30:37 [SEVERE]     at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:232)
    2011-06-23 15:30:37 [SEVERE]     at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:219)
    2011-06-23 15:30:37 [SEVERE]     at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:146)
    2011-06-23 15:30:37 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
    2011-06-23 15:30:37 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    2011-06-23 15:30:37 [SEVERE] [Permissions] Unable to load permission data.
    2011-06-23 15:30:37 [SEVERE] [Permissions] Shutting down Permissions due to error(s).
    And when I connect to the server I get this:
    Code:
    2011-06-23 15:31:02 [INFO] Metalcat [/127.0.0.1:49997] logged in with entity id 103 at ([ world] -2.0034450802459927, 72.0, 8.349565734279018)
    2011-06-23 15:31:02 [SEVERE] java.lang.NoSuchMethodError: com.nijiko.permissions.PermissionHandler.inGroup(Ljava/lang/String;Ljava/lang/String;)Z
    2011-06-23 15:31:02 [SEVERE]     at com.sk89q.bukkit.migration.NijiPermissionsResolver.inGroup(NijiPermissionsResolver.java:77)
    2011-06-23 15:31:02 [SEVERE]     at com.sk89q.bukkit.migration.PermissionsResolverManager.inGroup(PermissionsResolverManager.java:106)
    2011-06-23 15:31:02 [SEVERE]     at com.sk89q.worldguard.bukkit.WorldGuardPlugin.inGroup(WorldGuardPlugin.java:219)
    2011-06-23 15:31:02 [SEVERE]     at com.sk89q.worldguard.bukkit.WorldGuardPlayerListener.onPlayerJoin(WorldGuardPlayerListener.java:438)
    2011-06-23 15:31:02 [SEVERE]     at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:243)
    2011-06-23 15:31:02 [SEVERE]     at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    2011-06-23 15:31:02 [SEVERE]     at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
    2011-06-23 15:31:02 [SEVERE]     at net.minecraft.server.ServerConfigurationManager.c(ServerConfigurationManager.java:126)
    2011-06-23 15:31:02 [SEVERE]     at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:96)
    2011-06-23 15:31:02 [SEVERE]     at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:33)
    2011-06-23 15:31:02 [SEVERE]     at net.minecraft.server.NetworkListenThread.a(SourceFile:91)
    2011-06-23 15:31:02 [SEVERE]     at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:399)
    2011-06-23 15:31:02 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:309)
    2011-06-23 15:31:02 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    2011-06-23 15:31:02 [SEVERE] java.lang.NoSuchMethodError: com.nijiko.permissions.PermissionHandler.inGroup(Ljava/lang/String;Ljava/lang/String;)Z
    2011-06-23 15:31:02 [SEVERE]     at com.sk89q.bukkit.migration.NijiPermissionsResolver.inGroup(NijiPermissionsResolver.java:77)
    2011-06-23 15:31:02 [SEVERE]     at com.sk89q.bukkit.migration.PermissionsResolverManager.inGroup(PermissionsResolverManager.java:106)
    2011-06-23 15:31:02 [SEVERE]     at com.sk89q.worldguard.bukkit.WorldGuardPlugin.inGroup(WorldGuardPlugin.java:219)
    2011-06-23 15:31:02 [SEVERE]     at com.sk89q.worldguard.bukkit.WorldGuardPlayerListener.onPlayerJoin(WorldGuardPlayerListener.java:442)
    2011-06-23 15:31:02 [SEVERE]     at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:243)
    2011-06-23 15:31:02 [SEVERE]     at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    2011-06-23 15:31:02 [SEVERE]     at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
    2011-06-23 15:31:02 [SEVERE]     at net.minecraft.server.ServerConfigurationManager.c(ServerConfigurationManager.java:126)
    2011-06-23 15:31:02 [SEVERE]     at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:96)
    2011-06-23 15:31:02 [SEVERE]     at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:33)
    2011-06-23 15:31:02 [SEVERE]     at net.minecraft.server.NetworkListenThread.a(SourceFile:91)
    2011-06-23 15:31:02 [SEVERE]     at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:399)
    2011-06-23 15:31:02 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:309)
    2011-06-23 15:31:02 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    2011-06-23 15:31:27 [SEVERE] java.lang.NullPointerException
    2011-06-23 15:31:27 [SEVERE]     at com.sk89q.bukkit.migration.NijiPermissionsResolver.hasPermission(NijiPermissionsResolver.java:61)
    2011-06-23 15:31:27 [SEVERE]     at com.sk89q.bukkit.migration.PermissionsResolverManager.hasPermission(PermissionsResolverManager.java:102)
    2011-06-23 15:31:27 [SEVERE]     at com.sk89q.commandbook.CommandBookPlugin.hasPermission(CommandBookPlugin.java:458)
    2011-06-23 15:31:27 [SEVERE]     at com.sk89q.commandbook.CommandBookPlugin$1.hasPermission(CommandBookPlugin.java:187)
    2011-06-23 15:31:27 [SEVERE]     at com.sk89q.commandbook.CommandBookPlugin$1.hasPermission(CommandBookPlugin.java:184)
    2011-06-23 15:31:27 [SEVERE]     at com.sk89q.minecraft.util.commands.CommandsManager.hasPermission(CommandsManager.java:372)
    2011-06-23 15:31:27 [SEVERE]     at com.sk89q.minecraft.util.commands.CommandsManager.executeMethod(CommandsManager.java:302)
    2011-06-23 15:31:27 [SEVERE]     at com.sk89q.minecraft.util.commands.CommandsManager.execute(CommandsManager.java:256)
    2011-06-23 15:31:27 [SEVERE]     at com.sk89q.commandbook.CommandBookPlugin.onCommand(CommandBookPlugin.java:245)
    2011-06-23 15:31:27 [SEVERE]     at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    2011-06-23 15:31:27 [SEVERE]     at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:128)
    2011-06-23 15:31:27 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:287)
    2011-06-23 15:31:27 [SEVERE]     at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:712)
    2011-06-23 15:31:27 [SEVERE]     at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:678)
    2011-06-23 15:31:27 [SEVERE]     at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:671)
    2011-06-23 15:31:27 [SEVERE]     at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32)
    2011-06-23 15:31:27 [SEVERE]     at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    2011-06-23 15:31:27 [SEVERE]     at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
    2011-06-23 15:31:27 [SEVERE]     at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    2011-06-23 15:31:27 [SEVERE]     at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:399)
    2011-06-23 15:31:27 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:309)
    2011-06-23 15:31:27 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    This stops my permissions plugin and it happens only when I have this plugin or/and CommandSigns... =/
     
  16. Offline

    desht

    Looks to me like the errors are coming from WorldGuard and/or CommandBook, not SMS.

    What version of Permissions do you have installed?

    Do you get the errors with SMS installed, but not CommandSigns?

    The IllegalAccessError seems to be a common problem encountered with Permissions 3.x, and it appears one workaround is to rename Permissions.jar to zPermissions.jar (forces it get loaded later). See here.
     
    tagtastic likes this.
  17. Offline

    Metalcat

    I have the latest version of permissions installed (3.1.5b) and I got the error both with commandsigns and sms.
    But it works after i renamed my permissions.jar to zpermissions.jar :D
     
  18. Offline

    desht

    Good good :)

    Seems like it happens if you have Permissions 3.x and more than 12 plugins installed, regardless of what the plugins are. I'm guessing SMS/CommandSign were the most recent ones you installed, and they triggered the problem?
     
  19. Offline

    Metalcat

  20. Offline

    Xlaits

    Alright, quick question.
    for the permissions, how exactly is the command thing setup?
    Like:
    scrollingmenusign.commands.sms create name title

    Or what?

     
  21. Offline

    desht

    To create menus, you just need scrollingmenusign.commands.create.

    (More generally, to do "/sms command ...", you need scrollingmenusign.commands.command)
     
  22. Offline

    Xlaits

    Ohh, that makes a little more sense... I think...

    So, for, like, adding a menu option it would be
    Code:
    scrollingmenusign.commands.add
    Right?
     
  23. Offline

    desht

    Right :)
     
  24. Offline

    Anton1453

    cant add eny thing
     
  25. Offline

    desht

  26. Offline

    Anton1453

    what is wrong if i wright like this /sms add admin List:/list:eek:nline players is

    and the error says like this Menu-entry must include at least entery label &command

    i have watch the video some times now and the command list! i canĀ“t understand it...


    if u no please help me xD i love this m od if i get working for me!
     
  27. Offline

    desht

  28. Offline

    Andrew1431

    Multiple commands syntax?

    /sms add sign1 Spawn&Display|/spawn,/news ? will commas seperate commands? Or just one command? And how could you make one command branch off to others?
     
  29. Offline

    desht

    You can do this with macros, e.g.:

    Code:
    /sms macro add spawndisp /spawn
    /sms macro add spawndisp /news
    /sms add sign1 Spawn&Display|%spawndisp
    
    P.S. &D is a colour code so that might not look quite how you expected it to :)
     
  30. Offline

    Andrew1431

    Okay what about this, this might either be a CommandSigns question for that author: Is there a variable name for the person who executed the sign? Because i want an option as a joke to kick the person who did it, something like /kick %name% or /kick +name because I can kick specific people but there seems to be nothing for variable names. :p thanks!
     
  31. Offline

    desht

    Yeah, you can do that with help from CommandSigns...

    Code:
    /sms add sign1 Say Bye Bye!|/kick <NAME>
    
    Of course you need CommandSigns installed too for this to work (the <NAME> bit is parsed by CommandSigns).
     

Share This Page