Inactive [MISC] CommandHelper [3.2.0] - Repeat commands! Aliases! Advanced command scripting! [1000]

Discussion in 'Inactive/Unsupported Plugins' started by sk89q, Feb 16, 2011.

  1. Offline


    CommandHelper is a utility plugin for working with commands.

    • Build your own commands without knowing Java or having to make a plugin
    • Repeat your last command with /.
    • Per-player command aliases
    • Global command aliases

    [​IMG] CommandHelper 3.2.0

    [​IMG] Requirements: Java 1.6+ required. Mac OS X users may have to update their Java version. In addition, you need "WorldEdit," but the download linked above has a version with WorldEdit already bundled.


    Pinoyskii, DHLF, beleg and 6 others like this.
  2. Offline


    when i try to do any alias it says "an internal error occured while attempting to perform this command"
    why is this happening and how do i fix it??
  3. Offline


    I was just about to start writing something like this. Thanks! :D
  4. Offline


    It does this on purpose..
    I fire up the real console over ssh so I can see what happens (this takes time with my setup as I only have one slow computer)
    I restart and try /reloadaliases...
    And everything WORKS!

    How dare it start working while I'm trying to troubleshoot!
  5. Offline


    I'm using CH3.1.0, PEX1.11, and RB860.
    When I try to use:
    /test = if(array_contains(pgroup(),admin), run(/save-all))
    This error occurs:
    23:12:01 [INFO] An unexpected exception occured during the execution of a script.
    23:12:01 [SEVERE] java.lang.ArrayIndexOutOfBoundsException: 0
    23:12:01 [SEVERE]     at com.laytonsmith.aliasengine.functions.PlayerManangement$pgroup.exec(
    23:12:01 [SEVERE]     at com.laytonsmith.aliasengine.Script.eval(
    23:12:01 [SEVERE]     at com.laytonsmith.aliasengine.Script.eval(
    23:12:01 [SEVERE]     at com.laytonsmith.aliasengine.Script.eval(
    23:12:01 [SEVERE]     at
    23:12:01 [SEVERE]     at com.laytonsmith.aliasengine.AliasCore.alias(
    23:12:01 [SEVERE]     at com.sk89q.commandhelper.CommandHelperListener.runAlias(
    23:12:01 [SEVERE]     at com.sk89q.commandhelper.CommandHelperListener.onPlayerCommandPreprocess(
    23:12:01 [SEVERE]     at$5.execute(
    23:12:01 [SEVERE]     at org.bukkit.plugin.RegisteredListener.callEvent(
    23:12:01 [SEVERE]     at org.bukkit.plugin.SimplePluginManager.callEvent(
    23:12:01 [SEVERE]     at net.minecraft.server.NetServerHandler.handleCommand(
    23:12:01 [SEVERE]     at
    23:12:01 [SEVERE]     at net.minecraft.server.NetServerHandler.a(
    23:12:01 [SEVERE]     at net.minecraft.server.Packet3Chat.a(
    23:12:01 [SEVERE]     at net.minecraft.server.NetworkManager.b(
    23:12:01 [SEVERE]     at net.minecraft.server.NetServerHandler.a(
    23:12:01 [SEVERE]     at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    23:12:01 [SEVERE]     at net.minecraft.server.MinecraftServer.h(
    23:12:01 [SEVERE]     at
    23:12:01 [SEVERE]     at
    Thank you

    EDIT: rTriggers has the nifty equivalent of runas(console,command) - will this ever be possible with CH?
  6. Offline

    Connor Griffin

    Try this:
    /test = if(array_contains(pgroup(player()), admin), run(/save-all))
    opoq likes this.
  7. Offline


  8. Offline


    I'm sure I must be doing something stupid here, but I've got a permissions issue. First of all, here's my config:

    quiz:/quiz = >>>
        #    msg(concat(color(RED),'You do not have permission to run that command.'))
        #    die())
        #    msg(concat(color(RED),'You do not have permission to run that command.'))
        #    die())
            broadcast(concat(color(DARK_GREEN),'What should you do when entering a community build site?'))
            msg(color(YELLOW),'Ask for permission first.'))
            broadcast(concat(color(DARK_GREEN),'How can you ask for a promotion?')),
            msg(color(YELLOW),'Trick question; you shouldn\'t.'))
            broadcast(concat(color(DARK_GREEN),'What do the rules say about holes and towers?')),
            msg(color(YELLOW),'Don\'t build them.'))
            broadcast(concat(color(DARK_GREEN),'What is rule number two?')),
            msg(color(YELLOW),'No griefing!'))
            broadcast(concat(color(DARK_GREEN),'Whose actions are you responsible for?')),
            msg(color(YELLOW),'Those of anyone on your account.'))
    promote:/promote $name = runas(~op, concat('/manuadd ', $name ' Builder'))
    Anyway, I want to give ch.alias.promote and ch.alias.quiz to VIPs and up on my server, but if I do that, Builders and Defaults get "You do not have permission to use the color function." for /quiz and "You do not have permission to use the runas function." for /promote. I'd really like to either get a basic "You don't have permission for that command." or "You don't have permission to use <command>." Is there any way to do this without coding it myself, as in the commented section above?
  9. Offline

    Kevin Robbens

    Great, been looking for this!

    One thing,
    I had
    /h [$p] = /home $p
    It did work until i restarted the server.
    Only could use /h <player>, not /h.
    Restarted several times, didn't work anymore.

    Had to change it to
    /h = /home
    /h $p = /home $p
    /h $ = /home $
    Didn't work anymore.

    It should work with /h aswell, right? I'm pretty sure it did work before.
  10. Offline


    Haha, well, the important thing is, it's working now :)
    :confused: Do you know what was done to trigger it?

    You can give the the other groups negative permission to run the command. I think that should work. Try doing something like this in your Permissions yml file:

    - -commandhelper.alias.quiz
    Yep. It did. I broke it :(

    It's fixed in the newest version, which you can download now: or wait until we can get around to making an official build.
  11. Offline


    I'm almost worry to say this, wraith.. But it seems the 3.1.2 snapshot is broken
    With 3.1.1 this command worked perfectly
    /slap [$player='himself'] = /me slaps $player around a bit with a large trout
    However, with 3.1.2, /slap gives unknown command, while /slap scandragon works..
    (and no comments on me being old, please..)
  12. Offline


    does someone know how to make a comfortable promote with permissions3 ?
    i tried but on this i get no response
    /promote $player $group [$wld='world'] = /pr $player concat('w:',$wld) promote Guest concat('w:',$wld) $group
    or doesn't the default-group (if the player has no group) count as a group so that promoting along a track doesn't work?
    if i type it manual in the chat the response is that the user has been promoted, but he is still in the same group :/

    and this doesn't work also:
    /perm-add $player $group [$wld='world'] = /pr $player concat('w:',$wld) parents add &group $wld
    if i type it manual in the chat, it works fine

    CB935, CH3.1.0, Permissions3.1.5
  13. Offline

    Kevin Robbens

  14. Offline


    Hmm, I may or may not have fixed it just now, while working on another issue, but try updating to the newest dev build, and it'll work. One thing to note though, when running /me, you WILL get an unknown console command warning, but the command runs anyways. This is a bukkit bug, not CH.

    Try updating to the newest dev build as well,, I think your problem is with optional arguments being matched incorrectly. Once you update, if it still doesn't work, let me know.
  15. Offline


    Well, this one worked fine on 3.1.1, the problem only started on the latest dev build ;)
    And no.. I do not get an unknown command when supplying the optional argument, and the command isn't performed when I don't supply it

    Not a major problem (here) I should say.. It takes more than a few bugs to make me shout at devs :p
    What some people forget is, that they're using plugins that are still under development, on a third party server wrapper, for a game that's in beta.. Are they expecting a maglev train for the cost of a spare bicycle tire?
  16. Offline


    That just gives the same "You don't have permission to use the <function> function." message, so I'm having to do group checks within my scripts for now. :( Any hope on fixing this soon?
  17. Offline


    how to create:
    /me fall assleep => ivan fall assleep
    for any words count.
  18. Offline


    is there a way to use a "@playername text" instead of "/tell playername text"?
    i already tried "@$player $ = /tell $player $", but i get errors, it looks like commandhelper is only providing aliasis using "/" ? :(
    yes, i know there is a plugin for messaging player with @, but i dont want to use another plugin. Also i would use other commands with "@" or "." or "+"
  19. Offline


    Ok I give up, been reading the wiki for a couple of hours now I just can't figure out how to do this... at the moment I have:
    /promote $ = /pr $ w:world promote t:track
    The command works fine if I type /pr [name] w:world promote t:track, but if I type /promote [name] it says I performed a syntax error. tried multiple different methods, am I missing something obvious?

    ... Think I figured it out, I don't think the plugin is sending the colons, is there any way to force them?
    Figured it out, have to put 's around the parts with colons. Can't believe how much time I wasted because of that.. xD
  20. Offline


    there is a value for playernames, use "$player" instead of just "$"
    (dont know if thats the reason, but maybe...)
  21. Offline


    It works fine with just $, it was because the "w:world" and "t:track" weren't within quotes, so it wasn't sending the colons, thanks anyway. :)
  22. Offline


    I updated to 3.1.2 and /rules does work now but it does not give me my Rules.txt. Also none of the commands in global-aliases.txt are working

    @read Rules.txt
    @read Help.txt
    @read Donate.txt
    @read Website.txt
    @read Craftbook.txt
    @read Teamspeak.txt
    @read Lockette.txt
    @read Craftbook.txt
    @read Resinfo.txt
    Thing Hunter's Rules
    1. No Griefing
    2. No building on others buildings
    4. Admins have final say
    5. Move away from spawn to build > 100 blocks
    6. No Hacks. Period. Do not place REDSTONE with out MOD/ADMIN approval!
    7. You must report any exploits or you will be considered an accomplice.
    8. If you get heavily griefed, an admin may roll back the area (Admin Discretion)
    9. No provocative structures. Admins will deside what is or is not provocative.
    10. We will not even consider moving anything unless you are atleast Citizen.
    11. Banned? You must appeal ONLY on the forum at [URL=''][/URL]
    Using 935
  23. Offline


    Getting some errors with 3.1.1 on build 953. Updated to the posted 3.1.2 build to see if that would fix it. Same errors. I can post more logs and info if requested.

    Show Spoiler

    2011-07-03 16:42:39 [SEVERE] null com.laytonsmith.aliasengine.Constructs.Construct; local class incompatible: stream classdesc serialVersionUID = 4613233606537007885, local class serialVersionUID = 7845685218218885669
        at Source)
        at Source)
        at Source)
        at Source)
        at Source)
        at Source)
        at Source)
        at Source)
        at java.util.HashMap.readObject(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at Source)
        at Source)
        at Source)
        at Source)
        at Source)
        at com.laytonsmith.PureUtilities.Persistance.load(
        at com.laytonsmith.PureUtilities.Persistance.getNamespaceValues(
        at com.laytonsmith.aliasengine.User.getAliasesAsArray(
        at com.sk89q.commandhelper.CommandHelperListener.runAlias(
        at com.sk89q.commandhelper.CommandHelperListener.onPlayerCommandPreprocess(
        at org.bukkit.plugin.RegisteredListener.callEvent(
        at org.bukkit.plugin.SimplePluginManager.callEvent(
        at net.minecraft.server.NetServerHandler.handleCommand(
        at net.minecraft.server.NetServerHandler.a(
        at net.minecraft.server.Packet3Chat.a(
        at net.minecraft.server.NetworkManager.b(
        at net.minecraft.server.NetServerHandler.a(
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(
  24. I would like to report something....
    CommandHelper plugin, if its working together with NoCheat plugin (link) and with the latest 953 version, then a weird bug happens...You can make pistons ONLY ONCE. If you log in, make a piston then stop and start again the server and you try again to make pistons you'll see that you cant ! And not only messes up your map files you have to restore.
    I contacted the NoCheat author thinking its his plugin that does it and he told me this (read here).

    And also this (link) and (link).

    So can you please do this suggestion in the config.yml so i dont have to do it manually from now on?

    Everyone who was these 2 plugins together will have this problem.
  25. Offline


    Same issue.. Please help...
  26. Offline


    Hey, I'm kinda new at this, so if there's someplace else I should ask please let me know. I'm trying to use CommandHelper to determine the textual contents of a sign (if the block the player is looking at is a sign). Is this possible?
  27. Offline

    Connor Griffin

    @beowulf Currently this is not possible, although the developer of this plugin is looking to add more hooks into environments for future versions.
    This looks like stuff that only works for 2.x, or at least I think.
  28. Offline


    Connor, thanks for taking the time to reply - I appreciate it!
  29. Offline


    The next version will have much more simplified permission handling :D

    Hmm, I'm not sure I understand your question, but I think you want to try the Final Variable: /me $ = msg(player() 'fell asleep')

    There isn't currently a way to do this. In order to do this, I would have to hook into the chat events, as running @command wouldn't actually generate a command event. If more people request this functionality, I could add it though.

    Upgrading from 2.* to 3.* is essentially like using a completely different plugin. All the same functionality is there, but it is completely different. Unfortunately, sk89q isn't supporting 2.* anymore. Check the wiki for information on how to use 3.*.

    Hmm, no, not yet, but it's on the todo list. Currently, the most you could do is know that it is a sign, but not what it's text is. Keep checking back though!
  30. Offline

    Simon Welker

    I got a bug on a 953 server, apparently :(
    I am new to this, and I defined a command /tw to set weather, thunder, and time (it's all CommandBook cmds, I think) with four different options: worst, bad, english and good. I did it like this:

    /tw [$opt='good'] [$world='SmurphCraft'] [$dur=-1] = /time $world if(equals($opt, 'worst'), 22, if(equals($opt, 'bad'), 22, 8)) \
    /weather if(equals($opt, 'good'), 'sunny', 'stormy') $dur $world \
    /thunder if(equals($opt, 'worst'), 'on', 'off') $dur $world
    I dunno if this code is optimized as-is, but I don't care at the moment because it works-- but only when I give all arguments. I can use
    /tw good SmurphCraft -1
    and it will do everything I defined, but if I leave out any argument
    /tw good SmurphCraft
    /tw good
    , it just gives me the stupid 'Unknown console command. Type "help" for help.'

    Same thing with the "Better tp" Command on the sk89q Wiki example config. :/
    Any idea what the issue could be?

    Great work though, I like the logical and easy notation! Keep it up!
    Cheers, Simon

Share This Page