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


    I can confirm that the code works. Could you have left something out when copying?
  3. Offline


    This is all that's in my config.txt:

    Plugin List:

    Also, I have a plugin that lets me type /stop and /save-all (what I would normally type into the console) ingame. I forgot which one it is though...that might be interfering.
  4. Offline


    LOL I made a paradox:
    @read z1

    "An internal error has occurred"
  5. Offline


    Try this config.txt file (Right click, Save as...):
    Test both the /rank and /test commands.

    If that doesn't help, move all but the Essentials, GroupManager and CommandHelper plugins into another folder (server needs to be off). Then start the server again and check if the issue persists.
  6. Offline


    Hey guys, after the update to 3.x the /. command no longer repeats and commands from WorldEdit. Is there any fix? WorldEdit is what I majorly use this for.
    Joshua likes this.
  7. Offline

    Connor Griffin

    I'm really pleased with the additions you keep making to this plugin, Wraith, and even more excited for some of the things you mentioned on sk89q's forum.
  8. Offline


  9. Offline


    I just discovered why /. doesn't work with WorldEdit commands, I will fix that bug in the next version. As far as the Null Pointer Exception some of you are getting, I can't reproduce that on my machine, so I can't really help with that, until I can figure out how to make it happen on my machine. Any leads would be appreciated. Keep the bug reports coming!
  10. Offline


    Slight variation of your example - trying this out for the first time:
     /bananas = /give player() data_values('gold_pickaxe') 64 \
          	/give player() data_values('gold_spade') 64 \
          /give player() data_values('gold_axe') 64
    "Command failed with following reason: null"

    08:44:34 [SEVERE] java.lang.NullPointerException
    08:44:34 [SEVERE] 	at org.bukkit.material.MaterialData.<init>(
    08:44:34 [SEVERE] 	at org.bukkit.material.MaterialData.<init>(
    08:44:34 [SEVERE] 	at com.laytonsmith.aliasengine.functions.Minecraft$data_values.exec(
    08:44:34 [SEVERE] 	at com.laytonsmith.aliasengine.RunnableAlias.eval(
    08:44:34 [SEVERE] 	at
    08:44:34 [SEVERE] 	at com.laytonsmith.aliasengine.AliasCore.alias(
    08:44:34 [SEVERE] 	at com.sk89q.commandhelper.CommandHelperListener.runAlias(
    08:44:34 [SEVERE] 	at com.sk89q.commandhelper.CommandHelperListener.onPlayerCommandPreprocess(
    08:44:34 [SEVERE] 	at$5.execute(
    08:44:34 [SEVERE] 	at org.bukkit.plugin.RegisteredListener.callEvent(
    08:44:34 [SEVERE] 	at org.bukkit.plugin.SimplePluginManager.callEvent(
    08:44:34 [SEVERE] 	at net.minecraft.server.NetServerHandler.handleCommand(
    08:44:34 [SEVERE] 	at
    08:44:34 [SEVERE] 	at net.minecraft.server.NetServerHandler.a(
    08:44:34 [SEVERE] 	at net.minecraft.server.Packet3Chat.a(
    08:44:34 [SEVERE] 	at net.minecraft.server.NetworkManager.a(
    08:44:34 [SEVERE] 	at net.minecraft.server.NetServerHandler.a(
    08:44:34 [SEVERE] 	at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    08:44:34 [SEVERE] 	at net.minecraft.server.MinecraftServer.h(
    08:44:34 [SEVERE] 	at
    08:44:34 [SEVERE] 	at
    It blew up! :(
  11. Offline


    The newly added funtions are awesome! There's a store_value() function for storing global values! Also, making my players say things with the new chatas() function is going to be a lot of fun. And we can change blocks at certain locations!
  12. Offline


    /ch conflicts with some chat plugins. Anyway we can get a config option to change this command or to disable chathelper from using it.
  13. Offline


    Workaround: Rename CommandHelper.jar to zCommandHelper.jar and the other plugins will get priority.
  14. Offline


    I have removed the /ch command. Turns out I wasn't even using it, but it was defined in the plugin.yml file XD

    If you know what this means, this is a workaround: You can simply remove the /commandhelper (/ch) entry from the plugin.yml file. Zero functionality will be lost from commandhelper.
    If you don't know what that means, it will be fixed in the next update.
  15. Offline


    All I get, no matter what I try to have in the config.txt is an error when trying to compile the script. Any ideas?
  16. Offline

    Connor Griffin

    Can you please post your entire config and the error that you are getting, preferably using
  17. Offline


  18. Offline


    I have solved my problem, and I've now added a few aliases.

    I'm pretty sure I am doing this right, but it doesn't seem to work.

    I want to make a /hub command to take ppl back to our main world. They don't usually have multiverse permission but i want them to because to use the '/mvtp hub' via the /hub alias.

    They have the permission 'commandhelper.alias.hub' and the line for the hub alias is.

    Is there something I'm doing wrong? It still tells them they can't use that command.
  19. Offline


    Are OPs, without the permission for using /mvtp, able to use the command? If not, then running as ~op won't give them permission to use it. Some plugins don't let OPs have access to every command.
  20. Offline


    Is it possible that I make an alias with ':' in it? Doesn't seem to work.
  21. Offline


    Your right, no they dont.

    Any suggestions on a way to get this working?
  22. Offline


    Here's code that Connor Griffin posted on the commandhelper forum:
    Replace Admin with the name of the group that has the permission to use the command, and this code will try to run as whomever is online who is in that group. Be sure to replace <command> too.

    Probably not since : is used to make labels for commands. So whatever you have before ':' would become the label, and if you didn't have a / right after :, the code might not compile.
  23. Offline


    Guys, any chance to make alias for /money top [count] ?

    I want to create this one: /top [count] (like /top 10 - this prints 10 richest players on server)

  24. Offline

    Connor Griffin

    No, I don't believe that is possible with the current set of functions.
  25. Offline


    Assuming the command /money top [count] already exists, this is really easy:

    /top $count = /money top $count
    Or to make the number parameter optional:

    /top [$count] = /money top $count
  26. Offline

    Dead Fred

    Hmm would this mean that when i renamed CommandHelper.jar to .CommandHelper.jar that even if other plugins would have the same cmds the commandhelper alias would go first ?

    oh and is it just my logs that are getting spammed with :
    [INFO] Config file compiled sucessfully, with 1 alias(es) defined.
  27. Offline


    Renaming CommandHelper would only affect those commands which aren't aliases (one is /ch).
    Aliases will ALWAYS activate first and cancel the event before any other plugin sees it.
  28. Offline

    Dead Fred

    I'm trying to check if the player you try to kick is an admin however I fail:
    safe:/kick $player $ = if(array_contains(pgroup($player), 'admin'), /kick player() Trying to kick Admin, /kick $player $)
  29. Offline


    Try this instead:
    safe:/kick $player $ = if(array_contains(pgroup($player, 'admin')), sconcat(/kick player() Trying to kick Admin), sconcat(/kick $player $))
    if() expects 3 arguments, you were sending it 10, because /kick, player(), Trying, etc... are all seperate commands. This *should* be fixed in the next version, so that command would work.

    Sure, if it's in a string. Use single quotes to make a string.

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


    alias in config:
    /blub $a = /ci \ /blah $a
    result in console ->
    [SEVERE] Notice: Defined variable $a is unused near line 1
    [INFO] Config file compiled sucessfully, with 1 alias(es) defined.
  31. Offline

    Connor Griffin

    I get the same thing whenever I do simple aliases like this, and the variable isn't used in the first command. The command should execute just fine despite this.

Share This Page