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

Discussion in 'Inactive/Unsupported Plugins' started by sk89q, Feb 17, 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

    MineralMC

    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

    L24D

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

    Code:
    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(AliasCore.java:232)
    2011-04-26 22:41:52 [SEVERE]     at com.laytonsmith.aliasengine.AliasCore.reload(AliasCore.java:121)
    2011-04-26 22:41:52 [SEVERE]     at com.laytonsmith.aliasengine.AliasCore.<init>(AliasCore.java:47)
    2011-04-26 22:41:52 [SEVERE]     at com.sk89q.commandhelper.CommandHelperPlugin.onEnable(CommandHelperPlugin.java:70)
    2011-04-26 22:41:52 [SEVERE]     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
    2011-04-26 22:41:52 [SEVERE]     at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:632)
    2011-04-26 22:41:52 [SEVERE]     at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:218)
    2011-04-26 22:41:52 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:116)
    2011-04-26 22:41:52 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:94)
    2011-04-26 22:41:52 [SEVERE]     at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:217)
    2011-04-26 22:41:52 [SEVERE]     at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:204)
    2011-04-26 22:41:52 [SEVERE]     at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:144)
    2011-04-26 22:41:52 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:259)
    2011-04-26 22:41:52 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    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

    ksevelyar

    Same problem.
     
  5. Offline

    Ratchet

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

    MineralMC

    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

    Oifan

    Hello, the plugin works for me -- command /alias, but I had to add this into plugin.yml to make /viewalias work:
    Code:
        viewalias:
            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

    ks07

    @Ratchet

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

    If
    Code:
    /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

    Scooter789

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

    MineralMC

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

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

    Ratchet

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

    xlilcasper

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

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

    Code:
    /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

    DeanDip

    The two /automap commands and not having a proper variable are the problem. You need to make your /automap code look like this:
    Code:
    /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:
    Code:
    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: commandhelper.alias.safe, 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

    DeanDip

    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

    xlilcasper

    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

    Shoot

    Is it possible to delay between commands?
    #tospace
    /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

    DeanDip

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

    emoknight

    there no /viewalias command
     
  22. Offline

    Jdbye

    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

    xlilcasper

    Code:
    /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

    DeanDip

    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

    emoknight

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

    xlilcasper

    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

    emoknight

    i just come up with is
    Code:
     /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))
    fix:
    Code:
     /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

    dslip

    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