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

    sk89q

    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]

    [​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.

    [​IMG]

    [​IMG]
     
    Pinoyskii, DHLF, beleg and 6 others like this.
  2. Offline

    DeanDip

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

    BaconFace

    This is all that's in my config.txt: http://pastebin.com/GejL6zKM

    Plugin List: http://pastebin.com/Vg11vdQc

    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

    CoolOppo

    LOL I made a paradox:
    :/tp
    @read z1
    /tp

    "An internal error has occurred"
     
  5. Offline

    MrMagical

    Try this config.txt file (Right click, Save as...): http://dl.dropbox.com/u/62148/config.txt
    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

    Skrip037

    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

    sk89q

  9. Offline

    wraithguard01

    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

    Draconicus

    Slight variation of your example - trying this out for the first time:
    Code:
     /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"

    Code:
    08:44:34 [SEVERE] java.lang.NullPointerException
    08:44:34 [SEVERE] 	at org.bukkit.material.MaterialData.<init>(MaterialData.java:28)
    08:44:34 [SEVERE] 	at org.bukkit.material.MaterialData.<init>(MaterialData.java:19)
    08:44:34 [SEVERE] 	at com.laytonsmith.aliasengine.functions.Minecraft$data_values.exec(Minecraft.java:38)
    08:44:34 [SEVERE] 	at com.laytonsmith.aliasengine.RunnableAlias.eval(RunnableAlias.java:175)
    08:44:34 [SEVERE] 	at com.laytonsmith.aliasengine.RunnableAlias.run(RunnableAlias.java:62)
    08:44:34 [SEVERE] 	at com.laytonsmith.aliasengine.AliasCore.alias(AliasCore.java:97)
    08:44:34 [SEVERE] 	at com.sk89q.commandhelper.CommandHelperListener.runAlias(CommandHelperListener.java:82)
    08:44:34 [SEVERE] 	at com.sk89q.commandhelper.CommandHelperListener.onPlayerCommandPreprocess(CommandHelperListener.java:126)
    08:44:34 [SEVERE] 	at org.bukkit.plugin.java.JavaPluginLoader$5.execute(JavaPluginLoader.java:256)
    08:44:34 [SEVERE] 	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
    08:44:34 [SEVERE] 	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:289)
    08:44:34 [SEVERE] 	at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:674)
    08:44:34 [SEVERE] 	at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:645)
    08:44:34 [SEVERE] 	at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:639)
    08:44:34 [SEVERE] 	at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32)
    08:44:34 [SEVERE] 	at net.minecraft.server.NetworkManager.a(NetworkManager.java:196)
    08:44:34 [SEVERE] 	at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
    08:44:34 [SEVERE] 	at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    08:44:34 [SEVERE] 	at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:372)
    08:44:34 [SEVERE] 	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:287)
    08:44:34 [SEVERE] 	at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    
    It blew up! :(
     
  11. Offline

    DeanDip

    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

    xlilcasper

    /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

    MrMagical

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

    wraithguard01

    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

    pudd1nG

    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 www.pastebin.com
     
  17. Offline

    Skrip037

     
  18. Offline

    pudd1nG

    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

    DeanDip

    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

    An0nx

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

    pudd1nG

    Your right, no they dont.

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

    DeanDip

    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

    hofec

    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)

    thanks!
     
  24. Offline

    Connor Griffin

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

    MrMagical

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

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

    Code:
    /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 :
    Code:
    [INFO] Config file compiled sucessfully, with 1 alias(es) defined.
     
  27. Offline

    MrMagical

    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:
    Code:
    safe:/kick $player $ = if(array_contains(pgroup($player), 'admin'), /kick player() Trying to kick Admin, /kick $player $)
    
     
  29. Offline

    wraithguard01

    Try this instead:
    Code:
    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

    MG127

    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