Inactive [MECH] CommandSigns v1.2.0 - Issue commands using signs[1317]

Discussion in 'Inactive/Unsupported Plugins' started by HansAnderson, Aug 26, 2011.

  1. Offline

    HansAnderson

    CommandSigns:
    Version: v1.2.0

    This plugin is a complete rewrite of CommandSigns based off the original by Edward Hand. With CommandSigns, you can add invisible text or commands to signs. When the sign is right clicked, the command runs and/or the player gets a message.

    The /* feature of this plugin will not work properly with PermissionsExtended (PEX).
    There is a small issue where PEX doesn't utilize the permissions.yml from the root server folder.
    It has been tested with PermissionsBukkit and bPermissions.

    Features:
    • Run commands from signs
    • Signs can have any other text on them, the commands are linked to the sign behind the scenes
    • Uses a new permissions node so that players can use commands they wouldn't normally have access to!
    How to use:
    1. Place a sign, add any writing you want
    2. Add lines to your clipboard with /commandsigns line<number> <text>
    3. Right click a sign to make it a CommandSign
    Commands:
    Code:
    /commandsigns line<number> <text>
      - Add a line with one command (see Command Formatting). Number may be 0-9
    
    /commandsigns read
      - Read a CommandSign (the command lines associated with it)
      - Note: You need permission to create a sign in order to read
    
    /commandsigns copy
      - Copy a CommandSign to clipboard (the command lines associated with it)
      - Note: You need permission to create a sign in order to read
    
    /commandsigns clear
      - Clear your CommandSigns clipboard
    
    /commandsigns remove
      - Remove a CommandSign
    Command Formatting:
    In the place of <text> for a line, you may write a single command or sign formatting (such as @group). There are 10 total lines for separate commands or sign formatting. See Examples.
    Code:
    /command
      -  Runs a command from the player who clicked the sign
    /*command
      - Runs command with elevated permissions from the 'CommandSigns.permissions' node
      - Doesn't work for OP commands like /stop
      - (For WorldEdit //wand, use /*/wand)
    @group
      - Limits the sign use to only that group
      - **Check the permissions section below for usage!**
    \message
      - Print the message to the player's chat
    <NAME>
      - Replaced in the command by the player's name
    <X>/<Y>/<Z>
      - Replaced in the command by the player's x, y, or z coordinates
    Examples:
    examples (open)
    Code:
    /commandsigns line0 \say Hello server! <NAME> just logged on.
      - "Hello server! <playername> just logged on."
    
    /commandsigns line0 \You just clicked
    \commandsigns line1 \a sign!
      - "You just clicked
          a sign!"
      - (Message sent to the  player who clicked)
    
    /commandsigns line0 /*warp point1
      - Warps the player to point1
      - (If the /* nodes are set up correctly)
    
    /commandsigns line0 @mods
    /commandsigns line1 /*warp point1
      - Warps the player to point1 only if they have the 'CommandSigns.group.mods' permission node
      - (If the /* nodes are set up correctly)

    Permissions:
    permission nodes (open)
    Code:
    'CommandSigns.*'
      - All permissions
    
    'CommandSigns.create.*'
      - All create permissions
    
    'CommandSigns.create.regular'
      - Create signs without /* commands
    
    'CommandSigns.create.super
      - Create signs with /* commands
    
    'CommandSigns.remove'
      - Remove CommandSigns
    
    'CommandSigns.use.*'
      - Use all signs
    
    'CommandSigns.use.regular'
      - Use signs without /* commands
    
    'CommandSigns.use.super'
      - Use signs with /* commands
    
    'CommandSigns.group.<group>'
      - Replace<group> with the group name from @group
      - Allows use of signs with the matching group name
    
    'CommandSigns.group.*'
    - Allows use of all @group signs

    In your permissions.yml (in main server folder) create parent node 'CommandSigns.permissions' and attach children nodes from plugins you want to give permissions for when using the /* prefix.
    permissions.yml example (open)
    Code:
    CommandSigns.permissions:
        children:
            warp.go: true
    Now using /*warp <somewhere> on a sign will allow a player who doesn't normally have access to the /warp command to use the sign.

    Download CommandSigns
    Source

    Changelog:
    Version 1.2.0
    • Only one command per line now (commands can have many more syntax options)
    • Added ability to copy a CommandSign text to 'clipboard'
    • Fixed 'CommandSigns.group.*' permission node
    Version 1.1.0
    • Now supports all superperms permissions plugins!
    Version 1.0.1
    • Fixed a missing permissions node from the plugin.yml
    Version 1.0.0
    • Initial release

    I wanted the functionality of the old plugin, but the /* feature was broken. After becoming frustrated trying to figure out and update Fluff's version, I went back to the original and completely rewrote it. This is really my first plugin and Java experience.

    If this is not an acceptable submission, that is fine. I wrote it for my server and don't have time to go nuts adding features we don't need. However, I saw many people also wanted the /* feature, so I shared my work.

    I'm open to changing the name to something different, or withdrawing the submission. My main goal was to make this available to anyone who wants to use it.

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

    hiro24

    Any word on that compatibility w/ worldedit commands? Specifically, //load and //paste?
     
  3. Offline

    qwe1243

    is there any chance I could get a fully 1060 compatible version of this? :)

    I tried the newest version, but I, as an OP + all permissions via Permissions 3, do not have the permission to create signs. :(
     
  4. Offline

    t3hk0d3

    sources?
     
  5. Offline

    SubLexx

    for me work it all perfect as OP but as User or Moderator say it always that has no permission o.o
    i has add the permissions into the two groups ._.
    i use Permissions 3.1.6 from TheYeti
     
  6. Offline

    HansAnderson

    @SubLexx
    Permissions 3 doesn't work.

    @qwe1243
    Permissions 3 doesn't work.

    @hiro24
    Sorry, I'm not sure yet.'

    @DarkMinecrafter
    It doesn't need to be updated, but I'll change the number when a new feature is added.

    @Qentus
    I'm not sure. It might have something to do with how that plugin uses the command.
     
  7. Offline

    KrypleFyte

    Ugh, group manager never? that is a shame. I would pay good money to have this on my server again. Such an awesome plugin idea. How hard is the transfer from group manager to bPermissions?
     
  8. Offline

    NicoHood

    Hi, very nice plugin! Can you please add bukkit commands? is this possible?

    Can you please add a random number? Because I want to set 4 Warps called "warp1, 2,3,4" and i want to warp there randomly. this would be cool to add.
    example /commandsigns line0 /warp warp<random1-4>

    Tanks ;)
     
  9. Offline

    tha d0ctor

    could you make it so it is backwards compatible with the previous plugin command signs please?
     
  10. Offline

    TinyWeeny

    HansAnderson, would it be possible to make CommandSigns work with left clicks as well as right clicks?

    I'm using your mod to let players enter the MobArenas via signs, but there is a inventory glitch with right clicking signs. We had a little discussion about it over on the MobArena thread. It's not breaking anything, just a cosmetic bug, but I thought I would ask.

    Maybe you could add multiple commands to a sign; one on right click, one on left click?

    If not, no big deal, this is a great plugin, so thanks for your effort/time on it! :)
     
  11. Offline

    HansAnderson

    Sorry about the wait, but I just got the whole git hub deal figured out. The source is now in the OP.

    @KrypleFyte
    I hear that bPermissions is fairly easy. When super perms came out, I switched from Permissions 3 to PermissionsBukkit, and found it quite simple. It is a very useful plugin.

    @NicoHood
    Random numbers are a pretty niche use...

    @tha d0ctor
    There wasn't much need to keep it working exactly the same. This no longer requires two plugins.

    @TinyWeeny
    Hmmm. Darn, that's a strange issue. But if it's just an issue with CraftBukkit, hopefully it'll be fixed soon. I've always despised left click activation... Also, that would require that the server check the every block that someone left clicks on.
     
  12. Offline

    MintTheFox

    so any way to make the /* work with essentials GM?
     
  13. Offline

    THG3

    Where is the jar....
     
  14. Offline

    t3hk0d3

    Code:
    if(command.indexOf("/") == 0) {
    =>

    Code:
    if(command.startsWith("/")) {
    ;)
     
  15. @t3hk0d3 is that to fix //commands?
     
  16. Offline

    add1ct3dd

    unless im being stupid, where's the download link?

    it takes me to the repo but i don't see any compiled versions?
     
  17. Offline

    jeroen1602

    do it work whit i conomy? or make it whit i conomy!
     
  18. Offline

    t3hk0d3

    :D no, im looking sources for incompatiblity solution
     
  19. Offline

    foxsick

    Where is .jar file???
    I see only github link with sources...
    Thanks!
     
  20. Offline

    HansAnderson

    Whoops! I accidentally changed both links. The download for the .jar is fixed.

    @t3hk0d3
    Thanks! I saw the String.startsWith(string) after I wrote the plugin. Completely forgot to fix it. I don't thank that it will fix the // issue though... That's probably the command parser.
     
  21. Offline

    hiro24

    Thanks for sticking through w/ working on the // issue. Just wanted to drop that in. :)
     
  22. Offline

    HansAnderson

    @hiro24
    I know what the issue is, but I'm still deciding how to fix it. First I have to make it so that it doesn't try to split it into two commands (one with '/' and one with '/wand'). But also, the commands are run from inside Craftbukkit, and not just fake sent as a message from the player, so only commands that are prefixed by the standard / work. I need to look at how WorldGuard detects its commands and runs them.
     
  23. Offline

    MintTheFox

    ok how do i get this ro work with bPerms, i gave the group the use super node and there still denied access to spawnmob heres my permissions files:

    my permissions.yml:
    Code:
    CommandSigns.permissions:
        children:
            essentials.spawnmob: true
            essentials.warp: true
    my bPerms file:
    Code:
    default: lurker
    players:
    groups:
        lurker:
        - essentials.help
        - essentials.motd
        - essentials.rules
        - essentials.signs.disposal.use
        - essentials.signs.free.use
        - essentials.signs.heal.use
        - prefix.1.&1[&7New Comer&1]&8
        resident:
        - bPermissions.build
        - CommandSigns.use.*
        - CommandSigns.use.super
        - deathcontrol.use
        - ecoCreature.Creature.*
        - ecoCreature.DeathPenalty
        - essentials.afk
        - essentials.balance
        - essentials.chat.shout
        - essentials.clearinventory
        - essentials.compass
        - essentials.helpop
        - essentials.kit
        - essentials.kit.comp
        - essentials.kit.equipment
        - essentials.kit.fences
        - essentials.kit.tools
        - essentials.kit.torches
        - essentials.list
        - essentials.mail
        - essentials.mail.send
        - essentials.msg
        - essentials.pay
        - essentials.portal
        - essentials.sethome
        - essentials.signs.buy.use
        - essentials.signs.disposal.create
        - essentials.signs.mail.create
        - essentials.signs.mail.use
        - essentials.signs.protection.create
        - essentials.signs.sell.use
        - essentials.signs.trade.use
        - essentials.spawn
        - falsebook.blocks.bridge
        - falsebook.blocks.door
        - falsebook.blocks.gate
        - falsebook.blocks.hiddenswitch
        - falsebook.blocks.hiddenswitch.create
        - falsebook.blocks.lift
        - falsebook.ic.detection
        - falsebook.ic.selftriggered
        - falsebook.ic.standard
        - lockette.create.*
        - showcase.basic
        - showcase.buy.finite
        - showcase.buy.infinite
        - signColors.0
        - signColors.2
        - signColors.3
        - signColors.4
        - signColors.5
        - signColors.6
        - signColors.7
        - signColors.8
        - signColors.9
        - signColors.a
        - signColors.b
        - signColors.c
        - signColors.d
        - signColors.e
        - signColors.f
        - prefix.2.&1[&bResident&1]&f
        donator:
        - essentials.home
        - essentials.kit.farming
        - essentials.kit.foresting
        - essentials.kit.portal
        - essentials.kit.redstone
        - essentials.sell
        - essentials.signs.heal.create
        - essentials.signs.trade.create
        - essentials.warp
        - essentials.warp.list
        - prefix.3.&1[&6Donator&1]&f
        vip:
        - deathcontrol.free
        - essentials.back
        - essentials.heal
        - essentials.setwarp
        - essentials.tp
        - essentials.tpahere
        - prefix.4.&1[&dVIP&1]&f
        moderator:
        - essentials.kick
        - essentials.mute
        - essentials.togglejail
        - essentials.tpohere
        - prefix.5.&f[&2Mod&f]&e
        manager:
        - commandSigns.create
        - essentials.ban
        - essentials.banip
        - essentials.chat.spy
        - essentials.clearinventory.others
        - essentials.eco
        - essentials.signs.buy.create
        - essentials.signs.sell.create
        - essentials.unban
        - essentials.unbanip
        - lockette.admin.break
        - lockette.admin.bypass
        - lockette.admin.snoop
        - worldedit.selection.*
        - worldguard.region.*
        - prefix.6.&f[&cManager&f]&e
        admin:
        - craftbook.ic.restricted
        - deathcontrol.admin
        - essentials.give
        - essentials.god
        - essentials.heal
        - essentials.item
        - essentials.kill
        - essentials.spawnmob
        - groupmanager.*
        - lockette.admin.create.*
        - worldedit.*
        - prefix.7.&f[&4Admin&f]&e
        co-Owner:
        - '*'
        - prefix.8.co-owner
        owner:
        - '*'
        - prefix.9.&9[&bOwner&9]&e
    
     
  24. @HansAnderson I might have one piece of the puzzle, if you use.
    Code:
    Bukkit.dispatchCommand(player, command);
    
    instead of
    Code:
    player.performCommand(command);
    
    you don't need to worry about making sure the / that commands like /me and such would need is on there.

    Edit: Please see this pull request hans :) https://github.com/HansAnderson/CommandSigns/pull/1
     
  25. Offline

    estyx

    Great plugin, but I'm having problems getting my command to work:
    Code:
    /commandsigns line0 /command /cd play http://10.0.0.10/sound.ogg
    I've tried with all different combinations to make the parser not treat the /'s as a new line, but cant get it to work. Any workarounds for this?
    And a suggestion; make the signs run commands when powered by redstone, that would be awesome!
     
  26. Offline

    HansAnderson

    UPDATE
    Now CommandSigns v1.2.0

    NOTE: Only one command per line now. But they are much more flexible to crazy stuff that you want to add. Also, you can now copy a CommandSign text to your clipboard for easier editing.

    @tehbeard
    Thanks for the suggestions! I just updated to make it more flexible.

    @estyx
    Your sign should work nicely with the new update!
    Code:
    /commandsigns line0 /cd play http://10.0.0.10/sound.ogg
     
  27. Offline

    Seinna

    Your plugin would be perfect to our server if the sign had an item cost on use (or money, but I'd rather have item cost), is that a future thing?
     
  28. Offline

    hiro24

    // commands? *waits patiently and starry eyed*

    EDIT: HOLY HELL! It works!! Outstanding work guys! [diamond]'s for you!
     
  29. Offline

    desht

    Regarding costs... my ScrollingMenuSign plugin (which used to use the old CommandSigns command parser) now has its own command parser, which is usable by other plugins. @HansAnderson if you want to hook into it, you're totally welcome. Then again, maybe you have your own plans for that :)

    http://dev.bukkit.org/server-mods/scrollingmenusign/pages/command-parser/
    http://dev.bukkit.org/server-mods/scrollingmenusign/pages/api/

    It's heavily based on the old CommandSigns parser, but nearly a total rewrite, and more powerful in some ways. It also supports permissions elevation but I guess the implementation is somewhat different (I store a list of nodes to add in the SMS config file, and use player.addAttachment() / player.removeAttachment() as well as possibly setOp() ), so there might be a little integration work to do there...
     

Share This Page