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

    jmcneely

    I keep getting this error when I try to use /repeat or /.
    Code:
    12:32:00 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command '.' i
    n plugin CommandHelper v3.1.2
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:12
    9)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:3
    52)
            at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.
    java:737)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:701)
    
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:694)
            at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:89)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:454)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.NullPointerException
            at com.sk89q.bukkit.migration.ConfigurationPermissionsResolver.hasPermis
    sion(ConfigurationPermissionsResolver.java:104)
            at com.sk89q.bukkit.migration.ConfigurationPermissionsResolver.hasPermis
    sion(ConfigurationPermissionsResolver.java:99)
            at com.sk89q.bukkit.migration.PermissionsResolverManager.hasPermission(P
    ermissionsResolverManager.java:102)
            at com.sk89q.commandhelper.CommandHelperPlugin.runCommand(CommandHelperP
    lugin.java:169)
            at com.sk89q.commandhelper.CommandHelperPlugin.onCommand(CommandHelperPl
    ugin.java:132)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
            ... 12 more
     
  3. Offline

    Slyvr

    This mod is very unique...
    I'm hoping to combine this with TriggerCmds so that when a player clicks a button, it will activate an alias like this:
    Code:
    /joinwizard = /warp joinwizard \ /pex user player() group add Wizard \ /cast learn fireball \ /cast learn pain
    The problem is that player() does not have permissions to use pex or teach him/herself magicspells. Is there a way to determine who is doing the command. For instance, the /pex portion would be done by the console?
     
  4. Offline

    wraithguard01

    [
    player() returns the name of the player running the command, but I think what you're looking for is the runas(~op, '/cmd') function.

     
  5. Offline

    Slyvr

    So the syntax for something like that might be..
    Code:
    /joinwizard = /warp joinwizard \ runas(~op,/pex user player() group add Wizard) \ /cast learn fireball \ /cast learn pain
    ?
     
  6. Offline

    DeanDip

    Does PEX let OPs have permission to use all commands? If it does, running as ~op will work, but if not, it won't work. Same goes with the heros plugin. If it works for heros and PEX you'll want to use runas('~op', '/cmd') for each command, or else you'll have to give your players those permissions to use those commands.
    You'll want your code to look like this:
    Code:
    somelabelnamehere:/joinwizard = /warp joinwizard \ runas('~op', concat('/pex user ', player(), ' group add Wizard')) \ runas('~op', '/cast learn fireball') \ runas('~op', '/cast learn pain')
    and you'll need to give your players permission to use the labeled command (It needs to be labeled so that they can use the restricted function runas())
    That permission would be: commandhelper.alias.somelabelnamehere
    You can change somelabelnamehere to whatever you want to call it, like "safe" for example.

    I don't mean to over complicate things. I hope you are able to get it working.
     
  7. Offline

    Slyvr

    Ah, it's not over complicating at all. And yes ~op should be able to work for pex. For the magicspells plugin, I'm not sure yet, but I'll have to take a look at the commands again for that. I'm just not familiar with the syntax of it. This is a fantastic plugin though

    Edit: I tried running it and the runas op doesn't seem to work. First I tried it with no op and default permissions, all of the commands gave permission errors, then as OP and pex worked but magic spells did not

    Code:
    safe:/joinwizard = /warp joinwizard \ runas('~op', concat('/pex user ', player(), ' group add Wizard')) \ runas('~op', concat('/cast teach ', player(), ' fireball')) \ runas('~op', concat('/cast teach ', player(), ' pain'))
     
  8. Offline

    jmcneely

    @wraithguard01 - I'll just wait till the next stable version.

    But, has anyone gotten commandhelper to work with spawnlist? I'm mainly talking about items that require a dmg code like color wool. I've tried all combinations I can think of and only got errors. some combinations I've tried are
    "/pinkwool [$data=35:6] [$qty=1] = /give player() $data $qty"
    "/pinkwool [$data=35] [$qty=1] = /give player() $data:6 $qty"
    "/pinkwool [$data=35] [$dmg=6] [$qty=1] = /give player() $data:$dmg $qty"
    If anyone can show me what I am doing wrong, I would really appreciate it.
     
  9. Offline

    AllHailOllie

    Hello, I have this alias as the only alias in my config.yml:
    /nocave = //chunk \ //contract 65 down \ //replace 0,8,9,10,11,39,40 1
    When I run it, WorldEdit gives me a 'Too many arguments' error for the replace command. What am I doing wrong?
     
  10. Offline

    Slyvr

    Shouldn't replace only have 2 block ids or names? Such as //replace 0 8 - would replace air with water
     
  11. Offline

    wraithguard01

    You need to put ":" in quotes, because it's a special character. Try '35:6'.

    Whatever the problem is, it's with WorldEdit, not CommandHelper. Try running the commands individually until you work out which ones are the correct ones to add to the macro.
     
  12. Offline

    AllHailOllie



    I can assure you that all of those commands work individually. I type '//replace 0,8,9,10,11,39,40 1' and it replaces air, water, lava, and both mushrooms with stone.
    (8 and9 are both water, 10 and 11 are both lava)

    Ah! Found the problem! I had to put '0,8,9,10,11,39,40' in single quotes like that.
     
  13. Offline

    jmcneely

    @wraithguard01 - Thank you so much, it worked! Also from reading @AllHailOllie post it seems using those quotes can be very useful.
     
  14. Offline

    eRko16

    Hi please, can someone help me with script ? I want to make script for command /admins, which will show admins of the server to chat for player who executed the command, i have more groups for admins so please help.
     
  15. Offline

    BgRdDragon

    Exactly What I was looking for! I run a small server for friends, so being able to use their real-life names makes everything simpler! Another great plug-in by Sk89q !
     
  16. Offline

    BigDaddy5XL


    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    Figured this out myself. Why no help people?

    If you can't get any part of this plugin working, you need PermissionsBukkit along with SuperpermsBridge.

    http://forums.bukkit.org/threads/ad...2k-official-default-groups-plugin-1000.26785/

    THIS DOES NOT SUPPORT NEW PERMISSIONS!
    NEED: PermissionsBukkit along with SuperpermsBridge, and in the Permissions config.yml:
    Code:
    users:
        bigdaddy5xl:
            permissions:
                superpermbridge.*: true
     
  17. Offline

    wraithguard01

    Permissions are a bit of a clusterfuck right now, I hope to get this sorted out at some point :/

    Ah yes, I should have seen that. Commas have special meaning, and so therefore have to be quoted if you want to use them literally.
     
  18. Offline

    wraithguard01

    Just to let everyone know, I haven't had time to create an actual release build, but the newest dev versions allow you to control hunger, player modes, and potion effects! Note that to use the set_peffect function, you must be using CraftBukkit. Also, it's a very experimental feature, so don't be surprised if it changes. There are functions for controlling player's xp as well, however the bukkit team is still trying to work out some problems with the CraftBukkit side of things, so for now those functions are derpy (not because of CommandHelper though). Anyways, feel free to download the dev build from here and play around with it (rename the file to CommandHelper.jar after you download it). There are some release notes on this page, but the most important thing to note is that you'll have to delete your persistance.ser file one last time (if it exists, which it may not). To see the documentation for the new functions, see the staged API. If you find any bugs, please report them. There are several other features built in, but the documentation for them is not 100% complete yet, so if you need help with any of the new stuff, let me know, and I'll prioritize writing the documentation for it.

    We have been running this dev version on the nerd.nu servers for a while now, without incident, so don't let the word "dev" scare you, this build is very close to a release version.
     
  19. Offline

    Kane

    I'm having issues getting this to work. Basically I want the following to give a small idea for /north = /warp north using commandbook. BUT I want permissions per warp destination.

    I was told command helper would work so I tried the following:
    vip2:/north = /warp north
    vip2:/south = /warp east
    vip2:/east = /warp south
    vip2:/west = /warp west

    Looks fine from what I seen now I need to add the node for permissions:
    - commandhelper.alias.vip2
    (this what pex looks like)

    Now the problem now is that even basic users get /warp trade command. So they need to have:
    commandbook.warp.teleport

    Well this is the problem now everyone can use /north no matter what including /warp north.. I can't seam to restrict harsh enough so say the following:

    Normal:
    /warp trade
    vip 1:
    /warp nether
    /warp pvp
    vip 2:
    /warp south
    /warp north
    /warp east
    /warp west

    Since they need commandbook.warp.teleport as normal I don't see how to get it to work and Even when I had it set with vip2 /north let a normal user use it even though it clearly says vip2:


    Thanks for any help possible.
     
  20. Offline

    wraithguard01

    You can use the runas() function to allow them to run individual and carefully crafted commands as op, so they don't actually need the permission to run that command normally. Try something like this:
    Code:
    vip2:/north = runas(~op, /warp north)
    and remove their permission to use warp, but keep the commandhelper.alias.vip2 permission. Now they shouldn't have permission to use /warp normally, but the vip2 group can run /north, which indirectly makes them run /warp as an op.
     
  21. Offline

    Jameshobbs

    I'm using the latest version of the dev build and all the functionality is excellent and no problems whatsoever.

    Sadly because Permissions 3.x is not being supported anymore, our server had to change to PermissionsBukkit.

    We found bukkit's permissions to not fit our style for the server, so we switched over to PermissionsEX. With PEX we are not having many issues so far.

    I have not tested setting up group permissions for aliases yet, but I did notice that I was not able to get the groups for a player when using the pgroup or pinfo command within my aliases.

    Fortunately one of the aliases just needed to print out information so I just used /pex user group list command. Unfortunately Other commands wanted info from groups. This worked great under Permissions 3.x, but sadly the info is not coming in for PEX.

    So two questions:
    1) Will you add support for getting groups for PEX?

    2) Could you possibly have the runas and run commands to return the string that might be printed from the command that is run (if possible)?
    ... This way if I could parse the string then I could set it up so I could get the information I need from commands that I run using runas and run.

    Anyways love this plugin and have some really cool commands that I have implemented on it. For instance I created a gauntlet game just using CH, which included betting and such. Very cool deal.
     
  22. Offline

    halley

    Seconded for ensuring PermissionsEx support, including groups.
     
  23. Offline

    beleg

    nice plugin... really easy to set aliases :)
     
  24. Offline

    Clucky

    Hey man, I hate to be the one to inform you of this, but none of your plugins are working... worldedit, commandbook, commandhelper, they all have errors. I'll go ahead and post the one for this plugin:

    Code:
    07:15:41 [SEVERE] Could not load 'plugins/CommandHelper.jar' in folder 'plugins': WorldEdit
    org.bukkit.plugin.UnknownDependencyException: WorldEdit
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:133)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:213)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:136)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:138)
        at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:103)
        at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:52)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:136)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:348)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
     
  25. Offline

    wraithguard01

    I believe this functionality is working in the latest builds. You'll need to update to the dev builds of CH and WE (build.sk89q.com). CH uses WE for permissions handling, so if it's still not working, I'll direct the question to the developer who works on the permissions framework in WE.
    I may be able to with play-dirty mode, in some cases, but not all. The "right" way to do this then is, since you know more or less what the return will be, for you to get all text sent to the player, and deal with it manually. This will be possible once I get events working (we're about 2-3 weeks away from that).
    Looks like something is wrong with WE. Perhaps you don't have WE installed? If you're sure that's fine, download the newest dev build, and give that a shot.
     
  26. Offline

    Clucky

    Yeah, I kinda didn't have WorldEdit installed, for some reason I named it WorldEdit.2jar. Prob accidentally edited it or something lol. Working perfectly now. Thanks!
     
  27. Offline

    AsHperson

    pls UPDATEEE
     
  28. Offline

    wraithguard01

    kyle921 likes this.
  29. Offline

    kyle921

    Looking forward to the next release, as my server is rather crippled without all the awesome funcitonality that CommandHelper provides--thanks for working on this, wraith!
     
  30. Offline

    Four_Down

    Hi guys, whats the API for area/radius? I've managed everything but that:p
     
  31. Offline

    wraithguard01

    Be a bit more descriptive with what you're trying to do. I didn't really understand your question.

    3.2.0 is now released! Some of the more notable features include:

    • Procedures: Define your own functions!
    • Interpreter Mode: Run scripts from directly in game!
    • Potion Effects: Play around with them!
    • Economy: Give yourself money!
    • WorldGuard/WorldEdit: Automate protection!

    Be sure to check out the full change log. Here's the download link for 3.2.0.

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

Share This Page