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

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

  1. Offline

    Fluff

    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

    Source

    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

    Clem

    Just say in the sign who you want to run the command. E.g. replace <NAME> with a username. no? I would like it to be able to message me/give items when I step on a pressure plate.

    If a player steps into a cetian place, message (name), if catcus is ready for pickup (tell name). Probably other uses too
     
  3. Offline

    yup8

    thanks for the explenation , is there any news about SRM ? can't wait!
     
  4. Offline

    Fluff

    0.5 released.

    Finite-use signs are here. Just make a sign like normal, then use one of the enable commands to set how many uses it should have. A lot of code got changed in this one, so expect some bugs here and there. I tested a number of cases, but I'm sure some cases slipped through. If any errors get thrown or something just doesn't work like you think it should, let me know.

    Some random notes about this update:
    • If you did not have permission to create the sign, you cannot enable or disable it.
    • When you disable a sign, it loses all uses.
    • The enable and disable commands that take location parameters were specifically created for use by the console or by other command signs, but players can use them too.
    • (Sign has uses & enable command specifies uses) = Sign has number of uses specified by the command.
    • (Sign has uses & enable command does not specify uses) = No change.
    • (Sign does not have uses & enable command specifies uses) = Sign has number of uses specified by the command.
    • If you need to specify a world parameter but your world name is numeric, use "w:" on the front of it.
    • If a cost prevents a sign from being run to completion, the number of uses does not decrease.
    • When a sign runs out of uses, it is disabled so that you can come back and either take it down or re-enable it.

    I'll be updating the User Guide a bit later. Haven't heard anything from Milton about the SignReadMore changes. If I don't hear anything by the end of the week, I'll release my own fork of SignReadMore with the API changes until Milton gets around to adding it.
     
  5. Offline

    Sparky20

    Could you please stop the player from placing blocks when using the sign?

    This mod is awesome. And that is the only problem I have with it.
     
  6. Offline

    TheNander

    I'd Love to see redstone support for this.
     
  7. Offline

    Lanuk

    Awesome, thanks sooo much! So I know how to make people obtain currency for selling 20 iron... but I keep overcomplicating doing the opposite and selling currency to OBTAIN 20 iron. I confuse myself so much and it never works D:

    Could you help me please :/
     
  8. Offline

    yup8

    great updates [=
    trying to do somethin here, maybe you can help ?
    -a sign to let people add them selfs to a town.
    1.sign :
    [command]
    /*town add <NAME>

    2.i set the FakeUserName to Admin, and gave it '*' perms.
    3.i manually changed towny's config the made Admin the mayor.
    4.getting this error on consloe
    Code:
    12:16:11 [INFO] ? CommandSigns: &CommandSigns could not execute command "/town add yup8 ". Does command exist?
    12:16:11 [INFO] ? CommandSigns: If so, perhaps you should give permission to &CommandSigns
    is that Towny Problem? Like if the mayor is offline he can't add people?

    p.s - what if the FakeUser is a real user? does it means he will use commands against his will ?
     
  9. Offline

    badbh222

    That would simply be:
    $;-265,20;0,160
    0

    Selling 20 iron for 1600 currency. :)
     
  10. Offline

    NopeDK

    What about the possibilty to let commands act like /*command but for a true person, like this:
    Code:
    [command]
    ¤NopeDK
    /*command <arg>
    And that would execute the given command with &CommandSigns permissions but acting like it was me that
    wrote it. (for commands without a <player> argument)

    Also, I keep running out of space on the signs 'cause of long commands and would like to know if a command could be made that linked two signs together so they would read on from one sign to another?

    And I can't get @User and @group to work. I got - '*' permissions and in a group but whenever I do the @something and then a command it doesn't work. No console output. B766.
     
  11. Offline

    Fluff

    This is the important part. The name that you set for the fake user is only the display name. The fake user's real name is still &CommandSigns. This is why you can change the display name to something different and not have to change permissions. Permissions should be assigned to &CommandSigns, not to the fake user's display name. Similarly, the change to Towny's config should probably use &CommandSigns.

    One way to think about is /nick. /nick doesn't change your real login name; it just changes the name that's displayed by the server. Similarly, changing the fake user's display name through the configuration file doesn't change the fake user's real name.
    Almost. The negative doesn't go on the item id; it goes on the value. It also needs to go on the money's value.
    $;265,20;0,-160
    0
    I'd love to, but it's not going to happen (at least, not any time soon). I don't check the permissions for any commands you use (except the commandSign permissions, of course). The plugin that provides the command is the one that checks permissions. When I send a command to another plugin to be evaluated, I have to tell it which user is executing the command. There is no API for telling the plugin "Hey, use this user's permissions, but let that user evaluate the command." As a workaround, I could temporarily assign the fake user's permissions to the user, but this causes its own set of problems.
     
  12. Offline

    NopeDK

    What about the @user/@group. Is it just me that it ain't working for?
    And what about the linking of signs?
     
  13. Offline

    badbh222

    Oops! Haha, that might confuse him. :confused:

    That command would give 20 iron and take 1600 currency though, right?

    So what he needs would be:
    $;265,-20;0,160
    0

    I hope so, or I'll look like an even bigger idiot. :D
     
  14. Offline

    PsychoNecrosis

    It'd nice to be able to set a finite-use sign that topped itself back up every time the plugin was reloaded, like every restart. Is that possible, Fluff?
     
  15. Offline

    Fluff

    0.5.1 released.
    Indeed, it is not just you. @ was broken pretty badly. It's apparently been broken for a while. All fixed up now.
    Yup, that's in there too.

    In addition, I attempted to fix up the network code of the fake user. You might have noticed that output that would have been sent to the fake user due to a /* command was being sent to the player that used the sign. With this update, the player should no longer receive that output. Testing went fine but changing this code was a little messy, so if you notice any odd quirks due to using /* signs, let me know.
    Just so we're clear, the $ directive is a cost. 265,-20 is saying that you want a negative cost (a gift) of 20 265's. Keep in mind that the $ directive was added for cost signs, and you should be okay. If you want the sign cost to be 5 of something, you put 5, not -5.
    Possible, but unlikely. If you have a plugin that lets you run a script after a restart, you can enable the sign using /commandsign <uses> <x> <y> <z>. If a plugin does not exist that lets you run a script at restart, let me know. It'd be easy to make and so very useful.

    To everyone that asks about more room on the sign or redstone support, I tend very strongly to ignore questions that have been answered earlier in the thread, especially if they can be answered by visiting the issue tracker. It wastes my time to repeat myself, which is ultimately bad for the users of the plugin because I have less development time. Don't take it personally; just visit the links in the OP. They're there for a reason: to keep you as informed as possible.
     
  16. Offline

    badbh222

    Yes, he wanted to know how to sell currency and obtain iron, and with -20, that will give him iron instead of taking it, sorry for the confusion. :oops:
     
  17. Offline

    Lanuk

    -Hits face with palm- thanks :p
     
  18. Offline

    Brvtvs

    Thank you so much for fixing the group thing, my project is now finally functional, largely thanks to this plugin
     
  19. Offline

    Lanuk

    Ooh, I take that back, I wasn't getting the iron.

    So:

    $;-265,20;0,1600 didn't work
    $;265,20;0,1600 didn't work
    $;265,20;0,-1600 didn't work

    What do I do to get 20 iron for paying 1600? I am still so confused :p
     
  20. Offline

    Fluff

    The top one doesn't make sense; there is no such item as -265. The middle one takes 20 iron AND 1600 credits. The last one takes 20 iron and gives 1600 credits. To give 20 iron and take 1600 credits, just move the negatives around.
    $;265,-20;0,1600
     
  21. Offline

    Lanuk

    Ooh, thanks!
     
  22. Offline

    Clem

    You seem like an awesome dev. Got any how-tos lol. I have never done Java really before, looks like it could be useful/complicated just by looking at the source. Does anyone know of any timers? Like teleport person to here, wait 5 seconds and teleport back? Also any ideas on Cleaning up the code on the sign (Not showing it to the users, because people in my server are trying to make their own... All over the place)

    Sorry if was asked before :/

    Thanks a bunch Fluff (Lolin' Username bro)
     
  23. Offline

    Brvtvs

    This plugin basically acts as a fixall for so many of my problems, I can't wait for SRM support, keep up the good work!
     
  24. Offline

    NopeDK

    Got another suggestion: Cooldown signs. A great feature for PvP, whenever a sign with the cooldown set to something, is used, it will start counting down (visually, you are able to see how many seconds before it can be used nest) and when it reaches 0, it shows "Ready" and can be used again.
     
  25. Offline

    Fluff

    Cooldown signs are a possibility. I like the possible uses; I'm thinking an arena where players are constantly being damaged over time and scrambling to find heal signs to hit. Please add it to the issue tracker so that I don't forget. I'm currently focused on QuickStrasse; development on this is on hold until I hear back from Milton.
     
  26. Offline

    NopeDK

    Sorry 'bout that. Didn't see the duplicate.
     
  27. Offline

    Shalobee

    what did you do cause i am having the same problem?
     
  28. Offline

    Ranzear

    Okay, this might seem like a no-brainer after I suggest it but...

    Can you change <NAME> to a shorter tag? Like <N> or something? Cramped enough for space on a sign that making that tag as short as possible would be damned helpful.

    I could fit '/*demote <N>' on one line, but '/*demote <NAME>' is one character too long. Actually it isn't, but I had to squeeze in a world name after it, and <NAME> was too long, so I shortened my world name... Now I realize I could have put <NAME> on the first line and everything would have fit.

    Now I remember, it was when I was using /*promote <NAME>, which does make it one character too long. Different application but thats where the problem was.
     
  29. Offline

    Feoras

    Hi thanks for continuing this plugin!
    Just updated to your version.
    I'm using bukkit 740 and have one issue:
    A Sign with /*spawn or /*warp xxx (from essentials) will kick me with the following error:
    "You moved too quickly :( (Hacking?)"
    Using the commands without the signs works just fine.

    Any clue how/where to resolve this issue? Thanks in advance!
     
  30. Offline

    Fluff

    Yes, good suggestion. Any more ideas for placeholders? I was thinking a <I> to get the currently held item of the player.
    It's kicking you because you're moving the fake player around. With /*, you generally have to use a name placeholder and have the command operate on someone else.

    I plan on releasing again on Friday with SRM support, one way or another. Any other minor enhancements (like additional placeholders) can also find their way in to the next release (so get those suggestions in!). The development plan moving towards a 1.0 release:
    • SignReadMore support
    • Cooldown signs
    • Developer API
    After those are finished, I plan on developing these ('eventually' instead of 'immediately') to support CommandSigns:
    • CommandDelay - a plugin that adds a command to delay a command. This seemed possibly more useful than adding specific syntax to CommandSigns for delay signs.
    • RedstoneCommandSigns - a CommandSigns extension that implements redstone support. I still don't think redstone support will be useful, but at least this way it can be enabled and disabled independently of the rest of the functionality.

    0.6 released.

    Sorry, I got tired of waiting. SignReadMore support is here. You'll have to get the modified version of SignReadMore from the OP. When using SignReadMore support, make sure that you get a message on server start up about "SignReadMore version 3.3 with API". If you just get "SignReadMore version 3.3", you've got a ticking time bomb on your hands; get the version of SignReadMore with the API. In addition to including the API in SignReadMore, I fixed a few bugs here and there.

    Now, how does it work? If you want to use SignReadMore for a command sign, DON'T put [command] at the top of the sign. You can put anything you want on your sign; just don't make something that might look like a command sign on the first line. Instead, make the first line of your SRM be [command]. Then, just add the rest of your commands on the next nine lines. There's probably some text limit if you add them through chat, but if you use the file association feature of SRM, I don't think there's a limit on line length at all. Yes, you read that correctly; IN THEORY, this means that there is NO limit on the number or length of commands you can execute with a command sign created by SRM. When you've got your sign ready to go, you may notice that right-clicking on it just shows the commands. That's because you haven't enabled it yet. Use one of the enabling commands from CommandSigns, and you're off to the races. (Note: right-clicking on an SRM sign that's been associated with a file may lead to bad things happening if the line length is too long for the client. If it's a command sign, hurry up and enable it. You've been warned.)

    You'll probably want to know how to use SRM; go read about it over here. While you're over there, thank Milton for an awesome plugin.

    I plan on adding some placeholders that you can put on the sign to report about stuff that's happening in the SRM text. For example, the number of uses left and the cooldown time left (when added). If you've got any suggestions, tell me about 'em.

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

    NopeDK

    @Fluff Awesome!

    From what I could read about the SignReadMore support it doesn't use the [command] or the **[title], how do I get the nice looking green title back? Do you have support for colored text on signs?

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

Share This Page