Inactive [MECH] CommandSigns v0.9 - Issue commands using signs [953]

Discussion in 'Inactive/Unsupported Plugins' started by Fluff, May 5, 2011.

  1. Offline


    CommandSigns v0.9

    Tired of having to type out the same commands again and again? Want to allow your players to use commands only at certain places? Help is at hand!

    Feature Summary
    • Allows chat commands and chat messages to be send on right-clicking a sign.
    • Allows commands to be run on signs that players wouldn't be able to use through chat.
    • Sign usage can be limited to specific players or groups.
    • Supports 'variables' for player name and x,y,z position.
    • Won't allow users to gain access to forbidden commands without permission (secure).
    • Add a cost to use a sign, or a reward for clicking the sign!
    • Limit the number of times a sign can be used.
    • Enable and disable signs without destroying them.
    • Permissions-friendly
    • Developer API available
    User's Guide

    About The Developers

    Want to ensure your bug or suggestion isn't lost in the thread? Post it on our issue tracker.

    Command Summary (open)

    • /commandsign enable - Enables the next command sign you right-click on.
    • /commandsign enable <x> <y> <z> - Enables the command sign at x,y,z in the current world.
    • /commandsign enable <x> <y> <z> [w:]<world> - Enables the command sign in world <world> at x,y,z.
    • /commandsign enable [a:]<alias> - Enables the command sign at the alias.
    • /commandsign enable <uses> - Enables the next command sign you right-click on with a number of uses.
    • /commandsign enable <uses> <x> <y> <z> - Enables the command sign at x,y,z in the current world with a number of uses.
    • /commandsign enable <uses> <x> <y> <z> [w:]<world> - Enables the command sign in world <world> at x,y,z with a number of uses.
    • /commandsign enable <uses> [a:]<alias> - Enables the command sign at the alias with a number of uses.
    • /commandsign disable - Disables the next command sign you right-click on.
    • /commandsign disable <x> <y> <z> - Disables the command sign at x,y,z in the current world.
    • /commandsign disable <x> <y> <z> [w:]<world> - Disables the command sign at x,y,z in world <world>.
    • /commandsign disable [a:]<alias> - Disables the command sign at the alias.
    • /commandsign alias - Right-click on a block to get the alias of its location.
    • /commandsign alias <x> <y> <z> - Get the alias of the location x,y,z in the current world.
    • /commandsign alias <x> <y> <z> w:<world> - Get the alias of the location x,y,z in world <world>.
    • /commandsign alias [a:]<name> - Right-click on a block to set the alias of its location.
    • /commandsign alias <x> <y> <z> [a:]<name> - Set the alias of the location x,y,z in the current world.
    • /commandsign alias <x> <y> <z> w:<world> [a:]<name> - Set the alias of the location x,y,z in world <world>.
    • /commandsign alias remove - Right-click on a block to remove the alias of its location.
    • /commandsign alias remove [a:]<name> - Removes the alias.
    • /commandsign alias remove <x> <y> <z> - Remove the alias at location x,y,z in the current world.
    • /commandsign alias remove <x> <y> <z> w:<world> - Remove the alias at location x,y,z in world <world>.
    • /commandsign alias [a:]<name> [a:]<newname> - Set the alias of the location at <name> to <newname>.
    • /commandsign config - Lists all the configuration nodes.
    • /commandsign config <node> - Lists the configuration node.
    • /commandsign config <node> <value> - Sets the configuration node to the value.
    • /commandsign exec [a:]<alias> - Executes the command sign at the location pointed to by the alias.
    • /commandsign exec <x> <y> <z> - Executes the command sign at location x,y,z in the current world.
    • /commandsign exec <x> <y> <z> [w:]<world> - Executes the command sign at location x,y,z in world <world>.
    Syntax Summary (open)

    • [command] - use on the first line of a sign to define a command sign.
    • **[title] - use on the first line in place of [command] to customise the title of the sign
    • /command - runs a command as the player using the sign
    • /*command - runs a command as the fictional user &CommandSigns
    • /@command - elevates the player's permissions (using the permissions assigned to &CommandSigns) if necessary to run the command
    • @player/group - commands following (up to the next @) are limited to that player/group.
    • \message - prints the message to chat
    • \\message - prints the message to the player
    • <NAME> / <X> / <Y> / <Z> / <I> - replaced with the using players name/x/y/z-coord/current held item id on running.
    • $;<cost1>[;<costN>] where cost is <item id>,<item number> or <item id>:<item data>,<item number> - adds a cost to the sign
    • $$ - break evaluation of a command sign
    Permission Nodes (open)

    • commandSigns.use - Use a command sign.
    • commandSigns.create - Create, enable, or disable a command sign.
    • commandSigns.super - Create, enable, or disable a command sign using /*command, /@command, @player/group, or $.
    • commandSigns.super.cost - Create, enable, or disable a command sign using $.
    • commandSigns.super.elevated - Create, enable, or disable a command sign using /@command.
    • commandSigns.super.fakeuser - Create, enable, or disable a command sign using /*command.
    • commandSigns.super.restricted - Create, enable, or disable a command sign using @player/group.
    • commandSigns.default.<default group name> - A flag stating that the group is the default group.
    • commandSigns.config - Allows a user to manage the configuration.
    • commandSigns.alias - Allows a user to manage aliases.
    • commandSigns.exec - Allows a user to remotely trigger command signs.
    Reporting a Problem (open)
    The following bits of information are helpful to include when reporting a problem:
    1. Bukkit and plugin version.
    2. Excerpt from server log of the failed command usage, preferably with the debug configuration option set to true.
    3. Complete command sign text.
    4. Command sign configuration file.
    5. Name of plugin that the failed command comes from, preferably with a link to the plugin's forum thread.

    Recommended Plugins
    • With Annotate, you can have CommandSigns on practically any block with an almost unlimited amount of room for commands! They can even activate when pressing a button or a pressure plate!
    • With ScrollingMenuSign, your signs can look even nicer while allowing your users to scroll through a menu of commands!

    Download Latest Version
    MD5: 7f4076eea7198f2c0f17cde3f62f7c1f
    Download 0.8.1i - RB 803 and previous
    MD5: 72a60e16bfd775b3d15a03aca70e86e0


    To Everyone Asking For Redstone Support (open)

    Yes, I also think redstone support would be very cool. Unfortunately, there are some major limitations on what you can do with a redstone-controlled sign. You can read about those limitations in this post, and you can read a rationale about why those limitations exist in this post. Given those two limitations, I don't think redstone support is currently a useful feature to add, especially given what Annotate can do for you. (If you disagree, please post on the issue tracker on how you would use redstone support.) In the (not too distant) future, redstone support may will be added in a separate plugin due to the different nature of redstone command signs.

    Change Log
    version 0.9 - See Post
    • If PEX permissions work, this plugin supports it.
    • Economy redone; added Essentials Economy.
    • Localization support added.
    • Added new command: /commandsign exec
    • Events properly unregistered when plugin is disabled.
    version 0.8.13
    • Default groups should work for real.
    Older Entries (open)

    version 0.8.12
    • Added handling for default groups.
    • Added support for command aliases.
    • Added /commandsign config.
    version 0.8.11
    • Fixed @ directive.
    • Fixed '/commandsign disable' bug.
    • Added aliases.
    version 0.8.10
    • Fixed /@ permissions error.
    • Added exception handling for removing permissions from users.
    version 0.8.9
    • Added PEX and Permissions 3.0 support.
    • Added new placeholders: <N> and <I>
    • Fixed bug with regular / commands.
    • Added new directives: $$ and \\
    • Added additional debug messages.
    version 0.8.8
    • Fixed /* and /@ working without permissions support.
    • Fixed Permissions creating new users with the wrong casing.
    version 0.8.7
    • Fixed command sign creation permissions.
    • Added debug configuration option.
    version 0.8.6
    • Added Permissions checks to developer API.
    • Fixed enabling bug with /* and /@.
    • Updated to work with GroupManager and fake Permission plugins.
    version 0.8.5 - See Post
    • Fixed multi-world Permissions bug.
    • Changed @ group directive
    version 0.8.4
    • Removed support for Permissions 3.x
    • Updated to 818
    version 0.8.3
    • Fixed API bug
    version 0.8.2
    • Updated for Permissions 3.x
    version 0.8.1
    • Fixed GroupManager integration
    version 0.8
    • Added /@ to temporarily elevate a user's permissions.
    • Added developer API.
    version 0.7.1
    • Fixed item data bug - for real, this time.
    version 0.7 - See Post
    • Removed SignReadMore support.
    • Added Annotate support.
    • Added more granular permissions for advanced sign creation.
    • Removed a debug message that looked like an error.
    version 0.6.2
    • Fixed enable bug on sign creation.
    • Fixed item data bug.
    version 0.6.1
    • Fixed berating of users who can't create command signs but were just innocently putting up a sign.
    version 0.6
    • Added SignReadMore support.
    version 0.5.1
    • Can no longer place blocks directly on enabled command signs.
    • Fixed @ directive.
    • Changed fake user network code.
    version 0.5 - See Post
    • Added /commandsign commands.
    • Added finite-use signs.
    version 0.4.10
    • Fixed BOSEconomy support
    version 0.4.9
    • Supports BOSEconomy
    version 0.4.8
    • Trimming commands in hopes it fixes some problems.
    version 0.4.7 - See Post
    • Added cost signs.
    version 0.4.6
    • Hackish solution to 'items not showing up in inventory' bug.
    version 0.4.5 - See Post
    • Updated support for GroupManager.
    • Added configuration option to change the display name of the fake user.
    • Added configuration option to allow command parser to understand // commands.
    version 0.4.4
    • Fixed numerous bugs when not using Permissions.
    • Beginnings of an API for other plugin devs.
    version 0.4.3
    • Added configuration file.
    • Fixed chat command bugs.
    • Rearranged code for simpler maintenance.
    version 0.4.2 - See Post
    • BREAKING CHANGE - The fake user is now named &CommandSigns.
    version 0.4.1
    • Fixed for 740
    version 0.4
    • Bukkit team trying to break everything again
    version 0.35
    • Fixed conflict when using <NAME> in commands overriding permissions.
    version 0.3
    • Added NAME, X, Y and Z variables
    • Added permission filter
    • Allowed creation of signs that call commands user would not usually have access to
    • Allowed customisation of [command] to other text.
    version 0.15
    • Bugfix ("Insufficient Permissions" annoyance bug)
    version 0.1
    • Plugin Released
    Dimochka, c_dric, Flipp and 5 others like this.
  2. Offline


    The point of SRM was that all the command stuff could be hidden, including the [command] line. If you want to put colored text on your signs, you want to use another one of Edward's plugins: SignColors. It's inactive, but it apparently still works just fine (and if it doesn't, let me know). Just don't make the first line look like a command sign, and you should be all right.
  3. Offline


  4. Offline


    AYEEE!!! I just soiled my pants a little.

    The SRM worked once for me, but then it stopped working and it is just giving the text to me. I tried with [command] and **[test] for line 1.

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


    Updated SignReadMore to hopefully not crash the client or server when sending long SRM text.
    Is the SRM line 1 green?
  6. Offline


    No, it is white
  7. Offline


    This means the sign is not enabled. Did you enable it with only a single use? Try enabling it again. It shouldn't become disabled unless it runs out of uses or one of the disable commands are used.
  8. Offline


    I mean that no SRM signs work anymore, the test SRM files were:

    /warp bbattle


    /warp bbattle
  9. Offline


    Ah, are you trying to use /srm file? It looks like I missed a few test cases there. /srm line# worked fine, though. I'll poke it into shape.

    EDIT: Actually, already fixed it. SRM API v1.2 released.
  10. Offline


    Got a question. When you bind a text file to a sign (SRM) with the first line **[title], what is shown on the sign? Nothing?
  11. Offline


    :( It still isn't working.

    Do I need to wipe anything prior to using 0.6 with SRM?
  12. Offline


    The sign will not change. Whatever you had on the sign is what will remain on the sign.
    No, you shouldn't need to. Please tell me step-by-step what happens. I cannot currently reproduce this on my side.
  13. Offline


    I have Essentials, groupmanager, and srm on bukkit 766(for the testing). I do:
    /srm line1 [command]
    then right click the sign.
    /srm line2 /warp bbattle
    then right click the sign.
    then I try to use it and it just gives me the text
  14. Offline


    You're missing a step. After all the SRM text has been added, you have to /commandsign enable and right-click the sign.
  15. Offline


    Ohhhhhhhh!!! Thank you, I completely missed that
  16. Offline


    I have yet to get /* to work. I have tried making &Commandsigns op and admin in permissions using '*' . It always says in console that it could not execute the command Does it exist? If so, perhaps you should give permission to &CommandSigns. Which I have done. ... Any Ideas?
  17. Offline


    Is your &CommandSigns user surrounded by single quotation marks in your permissions config?

            group: Admins
                prefix: ''
                suffix: ''

    And as long as the "Admins" group has the '*' permission, it should work.
  18. Offline


    Yep in single quotes and in admin group just like you have there.
  19. I still, can't for the life of me, get /*command signs to work.

    group: Admin
    - dynamicmarket.access
    - dynamicmarket.sell
    - petition

    The user permissions are just for testing, I tried with a different group, or without any user permissions, seeing Admin has * anyways...

    Then a simple sign like:



    (/pe = petition)

    Simply does nothing, not even an I missing something stupidly obvious? :S

    Secondly, a request:

    Can you please split the super Permission node into 3 nodes? One for @, one for /*, one for $? Thanks!
  20. Offline


    Perhaps not as obvious as I hoped, but you are missing something. @ImHackinBored , this may very well be your problem as well.

    /* makes the fake user execute the command. When right-clicking on a sign that uses /*, one way to think about it is that there's really another player on your server and that player is going to do whatever /* is doing. Now, if another player on your server uses /who, what feedback do you expect? (Personally, I expect none since I didn't do /who; that other player did.) /* is most useful in conjunction with commands that take a player's name or commands that have global side-effects. It is not useful when used with commands that operate only on the issuing player; in fact, teleportation commands used on the fake user will likely kick you from the server.

    If this explanation has helped you better understand how to use /* or if you know a better way to explain it, please suggest a change to the OP and/or the User Guide.

    EDIT: BTW Joy, this won't work well with DynamicMarket for shop signs. DynamicMarket doesn't have commands that allow a player to make another player buy or sell something. However, DynamicMarket is also on my list of "plugins I maintain for my server but haven't yet released publicly". After I've gotten one or two of these plugins in a more or less finished state, I'll probably pick up DynamicMarket and DMWrapper (if someone else hasn't by that time). It probably wouldn't take much to create an additional plugin to work with DynamicMarket for DynamicMarket sign shops.
  21. Aaaah that explains!

    Oddly, this worked in hMod, is it just technically not possible in Bukkit?

    But it would be awesome if you could make it work with DM somehow, I guess you'd need to add a "/shop sell item player" and "/shop buy item player"...
  22. Offline


    The Holy Grail is really "use user A's permissions, but make user B do the command". This is possible, but I don't like it. It's possible by switching the fake user permissions and the real user permissions, and then switching them back after the command has been executed. My problem with this is the possibility that it will leave a user in an incorrect state with access to commands that was unintended. For example, if the user logs out at just the right time, I could see the possibility of the fake user's permissions being kept on the real user.

    Please add this to the issue tracker. This isn't the first time it's been brought up and I've thought about it a fair amount. This will either be a configurable option for all command signs or another command prefix to do this behavior. (I'm favoring /@, since you can't use that right now anyway.)
  23. Ok added, thanks!

    Did you see the hMod version that managed this btw? Was just thinking, they may have had an elegant way of making it reliable? Possibly it only worked due to hMod having an entirely different permission system, dunno :p
  24. Offline


    I expect this is the case. Still, I have no problem adding the feature and letting admins allow it at their own peril.

    In other news, I had an AMAZING idea this morning on how to improve the usefulness of CommandSigns. It may even be a substitute for redstone support. Other than that, I'm not going to say a lot about it. :p Feel free to watch the issue tracker, keep an eye on other plugins I develop, and create your own guesses.
  25. Offline


    Can't get SRM to work. First I place sign, then I do "/srm line1 test" and right click the sign, but whenever I right click the sign after that, nothing happens. If I do "/srm line1 [command]" then "/srm line2 /plugins" and right click, nothing happens. If I do "/commandsign enable" and right click my sign it says, "Command sign not clicked".
    Just checked my server log. Looks like extreme spam.
    @Fluff you must be psychic. 30 seconds after I post, you are online xD

    Attached Files:

  26. Offline


    I cannot duplicate this. Make sure you're running the most recent version of SRM from the OP; I did silently update it a couple of times. I'll do better about mentioning updates to the SRM API. The message at server startup should mention something about SignReadMore with API v1.2.
    Heh, surprise!
  27. Offline


    I will update everything again, and try...

    Tried resetting the plugins but whenever I right click the sign after using the "/srm line#" command it dumps that error with missing files and everything. Plugins on my server: BlocksOnGlass, ChairCraft, CommandSigns, DefaultCommands, MineCal, nSpleef, Permissions, Seasons, SignColours, SignReadMore(API) and War
    Oh, and on 766

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


    Okay, I think I figured it out. I was able to duplicate this by deleting my SignReadMore directory. Check to see if a SignReadMore directory exists in your plugins directory. If it doesn't, create it and try again.
  29. Offline


    Ahh thats why. Did thought it weird that no directory got made. Will create it now and return with the result

    Works perfectly now and with the SRM support this is just pure awesome. Well done @Fluff !

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


    Hello, I'm having a problem where when users who do not have the commandSigns.create permission, but are not trying to create a command sign (i.e. just making an empty sign, or ANY sign) receive this error:
    "You do not have permission to enable this sign."
    The sign is still created but the error is very annoying?
    I've been trying to find out if a mod is causing a conflict, and I even found the error (which appears twice) in the source, but so far I don't really understand that chunk of I'm not sure why it's throwing it.

            public void onPlayerInteract(PlayerInteractEvent event)
                                    Player player = event.getPlayer();
                                    String playerName = player.getName();
                                    Block block = event.getClickedBlock();
                                    String mode = _plugin.getPlayerModes().get(playerName);
                                    if(mode.length() != 0)
                                            case 'D':
                                                                    if(_plugin.hasRequiredPermissionsToEnable((Sign)block.getState(), player))
                                                                            player.sendMessage("Sign disabled.");
                                                                            player.sendMessage("You do not have permission to disable this sign.");
                                                                    player.sendMessage("Command sign not clicked.");
                                            case 'E':
                                                            if(_plugin.verifyDisabledCommandSign(block) || _plugin.verifyEnabledCommandSign(block))
                                                                    String[] temp = mode.split(":");
                                                                    if (temp.length == 1)
                                                                            if(_plugin.hasRequiredPermissionsToEnable((Sign)block.getState(), player))
                                                                                    player.sendMessage("Sign enabled.");
                                                                                    player.sendMessage("You do not have permission to enable this sign.");
                                                                    else if(CommonPlugin.isDigits(temp[1]))
                                                                            //enable with uses
                                                                            if(_plugin.hasRequiredPermissionsToEnable((Sign)block.getState(), player))
                                                                                    player.sendMessage("Sign enabled with " + temp[1] + " uses.");
                                                                                    player.sendMessage("You do not have permission to enable this sign.");
                                                                    player.sendMessage("Command sign not clicked.");
                                                  "? CommandSigns Warning: default case of onPlayerInteract");
                                            _plugin.getPlayerModes().put(playerName, "");
                                                    runCommand(block, player);
    Thank you for any assistance?

    Edit: I think I understand it now but I have no idea why it would be throwing those errors for empty signs, or signs with no colon in them at all? "Hello World" will throw the error...
  31. Offline


    Good point. I'll fix this up in the next release.

    EDIT: 0.6.1 released. Pretty sure only that bug fix is present.

Share This Page