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


    Oh, right!

    /gil [$1] [$2] = /money $1 $2 may work.

    /money gives the balance, and it allows you to use the other commands with the [optional] variables.
  3. Offline


    Hmm, the new version is broken on b733/734. the previous version works fine though.

    2011-04-26 22:41:52 [INFO] CommandHelper 3.0-beta1 enabled
    2011-04-26 22:41:52 [INFO] CommandHelper: Permissions plugin detected! Using Permissions plugin for permissions.
    2011-04-26 22:41:52 [SEVERE] java.lang.NullPointerException
    2011-04-26 22:41:52 [SEVERE]     at com.laytonsmith.aliasengine.AliasCore.getStringResource(
    2011-04-26 22:41:52 [SEVERE]     at com.laytonsmith.aliasengine.AliasCore.reload(
    2011-04-26 22:41:52 [SEVERE]     at com.laytonsmith.aliasengine.AliasCore.<init>(
    2011-04-26 22:41:52 [SEVERE]     at com.sk89q.commandhelper.CommandHelperPlugin.onEnable(
    2011-04-26 22:41:52 [SEVERE]     at
    2011-04-26 22:41:52 [SEVERE]     at
    2011-04-26 22:41:52 [SEVERE]     at org.bukkit.plugin.SimplePluginManager.enablePlugin(
    2011-04-26 22:41:52 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugin(
    2011-04-26 22:41:52 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugins(
    2011-04-26 22:41:52 [SEVERE]     at net.minecraft.server.MinecraftServer.e(
    2011-04-26 22:41:52 [SEVERE]     at net.minecraft.server.MinecraftServer.a(
    2011-04-26 22:41:52 [SEVERE]     at net.minecraft.server.MinecraftServer.init(
    2011-04-26 22:41:52 [SEVERE]     at
    2011-04-26 22:41:52 [SEVERE]     at
    2011-04-26 22:41:52 [SEVERE] CommandHelper: Unable to load working config file, aborting plugin operation
    Unless the config itself has changed somehow... something is wrong. :p ^^^
  4. Offline


    Same problem.
  5. Offline


    thanks but that command seems to do "/money ?" ;-;
  6. Offline


    Ahhh, I'm not sure. May need someone with more experience of the new scripting, as I'm not 100% sure if a [] variable is supposed to be completely ignored if it doesn't have anything entered for it.

    I do like the new 'final variable', but I can't tell if [$variables] are broken or not.
  7. Offline


    Hello, the plugin works for me -- command /alias, but I had to add this into plugin.yml to make /viewalias work:
            description: Shows all of the aliases for this user (with their id)
            usage: /<command>
            aliases: viewaliases
    Furthermore, each output text is in single line, so maybe there is a problem (missing?) with line separator (I run craftbukkit on WinXP64).
    Pitr likes this.
  8. Offline



    According to the wiki, your first (second?) attempt should have worked. See here:

    /gil $ = /money $
    doesn't work, then I'd ask sk to take a look because from what I can see that should be fine...
  9. Offline


    Is there way to get an the location of where the player is looking?
  10. Offline


    SK seems to be absent, so I sat down, had a play and worked it out. :) You want:

    /gil [$] = /money $
  11. Offline


    thanks man :)! really appreciate it.
  12. Offline


    Trying to use essentials clearinventory command. Here is the line from my config.txt

    /cleari = /clearinvnetory
    Keep getting unknown console command. Getting the same thing for these two towny commands as well

    /automap on = /resident set mode map
    /automap off = /resident set mode none
  13. Offline

    Connor Griffin

    I have a set of simple aliases and "scripts" in plugins/CommandHelper/config.txt, and I want to know how to restrict access to them using Permissions. I looked at the permissions page on the wiki, but I still can't figure it out. Let's say I have the following in config.txt: /welcome $player = /broadcast Welcome to our server, $player . Please type /rules for info on getting build rights.
    In this case, I would like a certain group to have access to /welcome, but still restrict their use of /broadcast any other time. Or maybe the reverse. I want a group with access to /broadcast to not be able to use /welcome.
  14. Offline


    The two /automap commands and not having a proper variable are the problem. You need to make your /automap code look like this:
    /automap $on = /resident set mode if(equals($on, 'on'), 'map', if(equals($on, 'off'), 'none', die('Only on or off is allowed.')))
    From what I understood from the Wiki, you can give them permission to it by labeling it like so:
    safe:/welcome $player = /broadcast Welcome to our server, $player . Please type /rules for info on getting build rights.
    and then giving the user this permission:, but I'm not sure if that's only for making restricted functions able to be used or making any command able to be used.
  15. Offline

    Connor Griffin

    Alright, I'll just deal with not tying specific commands to permissions since it now works with permissions for the commands that are aliased. Two more things though. First, is there a way to work a variable into a sentence, where there is punctuation touching the variable? Like: ... = ... $player, how are you?
    I want the comma in there after the player variable, but it breaks the variable. Is this possible without just rewording the command? Also, I used to be able to make an alias that typed into the chatbox, but it now requires things to be a command (start with a /). Is there a way around this?
  16. Offline


    For the first part you'll need to use the concat() function. It would look like this: concat($player, ',')
    For the second part, I'm afraid I don't know and would like to know if there is a way myself too.
  17. Offline


    Still doesn't work, I get unknown command.

    Also would like to see a function to say text in chat as a player or the player running the command.

    try replacing the $player, with concat($player,',')

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


    Is it possible to delay between commands?
    /space [$p1=''] = /rocket $p1 \ /rocket $p1 \ /rocket $p1 \ /rocket $p1 \ /rocket $p1 \ /rocket $p1

    Trying to do that but if you rocket all at once it just goes to the same height :X
  19. Offline

    Connor Griffin

    Edit: I figured all this and more out on my own, it just took some trial and error.

    I don't see anything on the wiki that has to do with pauses, only loops.
  20. Offline


    show your complete config.txt file. If one thing is done wrong, it causes all commands to not work.
  21. Offline


    there no /viewalias command
  22. Offline


    And adding aliases in 3.x gives me "Unexpected newline" no matter what I try to add even though there is no newline. Can't find any command list on the wiki, so I don't know if the usage has changed or not.
  23. Offline

    Connor Griffin

    That usually means that you forgot to put an equals sign on one of your aliases.
  24. Offline


    /trust $name = /manpromote $name trusted
    /vet $name = /manpromote $name Vet
    /protect = /lwc -c private
    /passlock $pass = /lwc -c password $pass
    /setpass $pass= /lwc -c password $pass
    /pass $pass = /lwc -u $pass
    /map = /towny map
    /automap $on = /resident set mode if(equals($on, 'on'), 'map', if(equals($on, 'off'), 'none', die('Only on or off is allowed.')))
    /slb [$page] = /shop list buy $page
    /sls [$page] = /shop list sell $page
    /ss $item [$amount=1] = /shop buy $item $amount
    /sb $item [$amount=1] = /shop sell $item $amount
    /clear = /clearinvnetory \ /kit admin
    /cleari = /clearinvnetory
    /test = /ping
    /togglestorm $st = storm($st)
    reboot:/reboot = /broadcast player() is rebooting the server \ runas(~op,'/save-all') \ runas(~op,'/stop')
  25. Offline


    I'm sorry, I don't see anything wrong in that. Does everything work when you take the /automap command out? If so, then I guess I did something wrong with it, and idk what. If not, you might want to try removing commands one at a time to see which one is causing them to not work.
  26. Offline

    Connor Griffin

    Wouldn't it have to be:
    /automap $on = /resident set mode if(equals($on, 'on'), 'map'), if(equals($on, 'off'), 'none'), die('Only on or off is allowed.')
  27. Offline


    name: CommandHelper
    main: com.sk89q.commandhelper.CommandHelperPlugin
    version: 3.0-beta1
            description: Command helper
            usage: /<command>
            aliases: ch, commandhelper
            description: Repeat the last command
            usage: /<command>
            aliases: .
            description: Performs a command on other players
            usage: /<command> <targets> <cmd>
            description: Perform a command as another player
            usage: /<command> <targets> <cmd>
            description: Create an alias
            usage: /<command> <name> <cmd>
            description: Remove an alias
            usage: /<command> <name>
            description: Reloads aliases
            usage: /<command>
    can u see the viewalias command is missing
  28. Offline


    No you want the if for the off check to only fire when on wasn't there. Kind of like an if-else. So it needs to be the second part of the if statement. It looks as if when I type the commands it is recognizing them. For example when I do /clear it gives me an unknown command on /clearinventory but does do the /kit admin. Typing /clearinventory works just fine.
  29. Offline


    i just come up with is
     /weather $change = /weather if(equals($change, 'rain'), stromy \ /thunder off, if(equals($change, 'sun'), sunny \ /thunder off, if(eduals($change , 'stormy'), stormy \ /thunder on , $change))
     /weather [$change=sunny] [$time=''] = /weather if(equals($change,'rain'),stormy,if(equals($change,'sun'),sunny,$change)) $time \ /thunder if(equals($change,'stormy'),on,off)
  30. Offline


    Could you please add a 'random' feature so that a it can be used to pick a random numbers.
  31. Offline

    Connor Griffin

    A random feature, an ability to add pauses, and a way to tmsg() all players on the server. If this already exists, please let me know.
    If you use the one I supplied, and take off die(), it works perfectly fine. Also: /clear = /clearinvnetory \ /kit admin

Share This Page