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

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    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

    dslip

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Could you please add a 'random' feature so that a it can be used to pick a random numbers.
     
  3. Offline

    Connor Griffin

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    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
     
  4. Offline

    MineralMC

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    SK requested I re-post my suggestion in here, so:
    How about something to slow down processing of commands?

    In the sense of:

    /command1
    -wait 2
    /command2

    For a two second pause before executing command 2?
     
  5. Offline

    xlilcasper

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    I would like to see a delay function added in. Something along the line of Delay(X) where X is either milliseconds or server ticks. It would wait until the delay was done before moving to the next command.
     
  6. Offline

    Connor Griffin

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Edit: Nevermind...
     
  7. Offline

    Jdbye

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    I'm using /alias, not modifying the .txt file. I don't care about global aliases.
    I'm just trying to use the alias command like this: /alias /fw /fixwater 40 - which works fine in CommandHelper 2.x
     
  8. Offline

    xlilcasper

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    took the die off and it still does not work, he is the line as it is now
    Code (Text):
    1.  
    2. /automap $on = /resident set mode if(equals($on, 'on'), 'map'), if(equals($on, 'off'), 'none')
    3.  
    In the menu mod I am running I had to change the plugin code a bit to send the /resident command as chat instead of as a command. I can get the exact changes if needed. Do you think this could be an issue? Towny not using the proper way to listen for commands?

    /clearinventory seems to work now, thanks!
     
  9. Offline

    BlueJeansAndRain

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    CbutD just updated CH for me and this now happens on startup:
    Code (Text):
    1. 08:26:10 [INFO] CommandHelper 5-wiz enabled
    2. 08:26:10 [SEVERE] com/sk89q/bukkit/migration/PermissionsResolverManager loading CommandHelper v5-wiz (Is it up to date?)
    3. java.lang.NoClassDefFoundError: com/sk89q/bukkit/migration/PermissionsResolverManager
    4.         at com.sk89q.commandhelper.CommandHelperPlugin.onEnable(CommandHelperPlugin.java:70)
    5.         at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
    6.         at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:632)
    7.         at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:218)
    8.         at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:116)
    9.         at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:94)
    10.         at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:217)
    11.         at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:204)
    12.         at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:144)
    13.         at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:259)
    14.         at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    15. Caused by: java.lang.ClassNotFoundException: com.sk89q.bukkit.migration.PermissionsResolverManager
    16.         at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    17.         at java.security.AccessController.doPrivileged(Native Method)
    18.         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    19.         at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:36)
    20.         at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:24)
    21.         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    22.         at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    23.         ... 11 more
    24.  
    I don't have permissions installed, but this looks like like a build error to me.
     
  10. Offline

    fugue2005

    My BukkitDev Profile
    My Plugins (0)
    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    i keep trying to do simple aliases but keep getting "unexpected newline"
     
  11. Offline

    emoknight

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    do u have anything in ur config?
     
  12. Offline

    fugue2005

    My BukkitDev Profile
    My Plugins (0)
    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    yes, a few that i put in manually, but when i try /alias it doesn't work
     
  13. Offline

    emoknight

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    r u putting something like is in /alias /aliasname = /realcommand ??
     
  14. Offline

    sk89q

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
  15. Offline

    baunegaard

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Cant get 3.0.1 to work:


    2011-05-05 13:26:44 [INFO] CommandHelper 3.0.1 enabled
    2011-05-05 13:26:44 [INFO] CommandHelper: Permissions plugin detected! Using Permissions plugin for permissions.
    2011-05-05 13:26:44 [SEVERE] java.lang.NullPointerException
    2011-05-05 13:26:44 [SEVERE] at com.laytonsmith.aliasengine.AliasCore.getStringResource(AliasCore.java:232)
    2011-05-05 13:26:44 [SEVERE] at com.laytonsmith.aliasengine.AliasCore.reload(AliasCore.java:117)
    2011-05-05 13:26:44 [SEVERE] at com.laytonsmith.aliasengine.AliasCore.<init>(AliasCore.java:43)
    2011-05-05 13:26:44 [SEVERE] at com.sk89q.commandhelper.CommandHelperPlugin.onEnable(CommandHelperPlugin.java:75)
    2011-05-05 13:26:44 [SEVERE] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
    2011-05-05 13:26:44 [SEVERE] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:670)
    2011-05-05 13:26:44 [SEVERE] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:234)
    2011-05-05 13:26:44 [SEVERE] at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:130)
    2011-05-05 13:26:44 [SEVERE] at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:108)
    2011-05-05 13:26:44 [SEVERE] at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:217)
    2011-05-05 13:26:44 [SEVERE] at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:204)
    2011-05-05 13:26:44 [SEVERE] at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:144)
    2011-05-05 13:26:44 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:259)
    2011-05-05 13:26:44 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    2011-05-05 13:26:44 [SEVERE] CommandHelper: Unable to load working config file, aborting plugin operation

    It just seems to generate a config.txt on 0 bytes

    And a preferences.txt with:

    #Whether or not to display warnings in the console, while compiling
    show-warnings=true
    #Whether or not to display the original command in the console
    console-log-commands=true
    #Whether or not to display debug information in the console
    debug-mode=false
     
  16. Offline

    fugue2005

    My BukkitDev Profile
    My Plugins (0)
    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    ahh ok thanks.

    next problem, i tried making some global aliases by typing them in manually, but it seems that anything past the 4th script isn't being read.
    i know it's not a problem with the script because if i put it at the top of the list it works fine but the (now #5) script does not.

    and /viewalias comes up with unknown console command.
     
  17. Offline

    emoknight

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME

    u maybe did somthing wrong in the config file

    for /viewalais. have u update the plugin?
     
  18. Offline

    Connor Griffin

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Can you give a few examples on how to use ivariables, and how to work with arrays?
     
  19. Offline

    emoknight

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    how do i use tmsg() to send the message to all users?
     
  20. Offline

    MrMagical

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    It's easier to use
    Code (Text):
    1. broadcast(<Message>)
    which is basically equivalent to
    Code (Text):
    1. foreach(all_players(), @p, tmsg(@p, <Message>))
    where <Message> is the sent message.

    Assign a string ivar where we replace a word with the player name and then display it:
    Code (Text):
    1.  
    2. /hello = >>>
    3.  assign( @hello, 'Hello World' )
    4.  assign( @hello, replace(@hello, 'World', player()) )
    5.  msg(@hello)
    6.  <<<
    7.  
    Make an empty array, populate it with the arguments in reverse order and then make a space separated string out of it which is sent back:
    Code (Text):
    1.  
    2. /backwords [$] = >>>
    3. if(equals($, ''),
    4.     msg('§cUsage: /backwords <word> [[word2]...]'),
    5.     g(
    6.         assign(@resultarray, array()),
    7.         for(assign(@i, array_size(parse_args($))), gt(@i, 0), dec(@i),
    8.             array_push(@resultarray, array_get(parse_args($), subtract(@i, 1)))
    9.         ),
    10.         foreach(
    11.             @resultarray, @resultindex, assign(@result, sconcat(@result, @resultindex))
    12.         ),
    13.         msg(trim(@result))
    14.     )
    15. )
    16. <<<
    17.  
    Is Notch on the server?

    Code (Text):
    1. /notch = if(array_contains(all_players(), 'Notch'), msg('§aNotch is on this server! :D'), msg('§cNotch is not on this server. :('))
     
  21. Offline

    MG127

    My BukkitDev Profile
    My Plugins (1)
    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    i have the same, but i have permissions installed.
    Code (Text):
    1.  
    2. 2011-05-06 21:35:38 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-706-gf53e007-b740jnks (MC: 1.5_02)
    3. 2011-05-06 21:35:38 [INFO] Preparing level "world"
    4. 2011-05-06 21:35:38 [INFO] Preparing start region
    5. 2011-05-06 21:35:39 [INFO] [Permissions] (Phoenix) was Initialized.
    6. 2011-05-06 21:35:39 [INFO] CommandHelper 3.0.1 enabled
    7. 2011-05-06 21:35:39 [SEVERE] com/sk89q/bukkit/migration/PermissionsResolverManager loading CommandHelper v3.0.1 (Is it up to date?)
    8. java.lang.NoClassDefFoundError: com/sk89q/bukkit/migration/PermissionsResolverManager
    9.     at com.sk89q.commandhelper.CommandHelperPlugin.onEnable(CommandHelperPlugin.java:72)
    10.     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
    11.     at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:632)
    12.     at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:218)
    13.     at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:116)
    14.     at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:94)
    15.     at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:217)
    16.     at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:204)
    17.     at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:144)
    18.     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:259)
    19.     at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    20. Caused by: java.lang.ClassNotFoundException: com.sk89q.bukkit.migration.PermissionsResolverManager
    21.     at java.net.URLClassLoader$1.run(Unknown Source)
    22.     at java.security.AccessController.doPrivileged(Native Method)
    23.     at java.net.URLClassLoader.findClass(Unknown Source)
    24.     at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:36)
    25.     at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:24)
    26.     at java.lang.ClassLoader.loadClass(Unknown Source)
    27.     at java.lang.ClassLoader.loadClass(Unknown Source)
    28.     ... 11 more
    29. 2011-05-06 21:35:41 [INFO] DefaultCommands 3.2.2 is enabled.
    30. 2011-05-06 21:35:41 [INFO] [Permissions] version [2.7.2] (Phoenix)  loaded
    31.  
     
  22. Offline

    Juze

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Same problem in here. I've used 2.0 in past. #740
     
  23. Offline

    MG127

    My BukkitDev Profile
    My Plugins (1)
    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    i forgot to mention ... this is on my minimal testserver for plugins. on my main-server i have an other error
    Code (Text):
    1.  
    2. 2011-05-06 21:56:07 [SEVERE] CommandHelper: Configuration Compile Exception: Unexpected newline near line 140 of configuration file. Please check your config file and try again.
    3. 2011-05-06 21:56:07 [SEVERE] CommandHelper: Unable to load working config file, aborting plugin operation
    4.  
    but my config.txt is only 138 lines long
     
  24. Offline

    KoffiePatje

    My BukkitDev Profile
    My Plugins (2)
    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Could anybody tell me how to add up strings (A)

    /foo = chat( color('red') + "SomethingThatNeedsToBeRed" )

    does not compile. ( in normal programming this does as long as color returns a string (A) somebody who had more luck with his / her tries.

    gr KoffiePatje


    SOLVED MYSELF :p Solution for whoever
    /cmd = chat( concat( color('red'), 'lol' ) )
     
  25. Offline

    emoknight

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Code (Text):
    1. /weather [$change=''] [$time=''] = /weather if(equals($change,'rain'),stormy,if(equals($change,'sun'),sunny,$change)) $time \  if(equals($change,'stormy'),run(/thunder on)) if(equals($change,''),'',run(/thunder off))
    2.  
    can someone help me with is? plz
    edit: it the 2nd part i cant get right

    edit2:
    ok do not need help now lol
    i work it out :)
    Code (Text):
    1.  
    2. /weather [$change=''] [$time=''] = >>>
    3. /weather if(equals($change,'rain'),stormy,if(equals($change,'sun'),sunny,$change)) $time \
    4. if(equals($change,''),'',if(equals($change,'stormy'),runas(player(),'/thunder on'),runas(player(),'/thunder off')))
    5. <<<
     
  26. Offline

    LucidLethargy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    holy crap man, this is amazing. I can't believe I only just found this... no more asking devs to help me out, this will do all the neat stuff I want! I would like to know if anyone has a built script for commands for items, though, as this is exactly what I want to start using this for! Simply /command = does a command, and costs an item. I obviously can throw together that simple part, too, but what I wonder is if there's a script someone else built that will function a little more dynamically...

    namely: if you don't have enough of an item, it tells you "this" and then disallows the action.
    if you do have enough, it tells you "this" and allows the action, then removes the item from inventory.

    Not too hard to figure out I imagine, but before putting the time in I was wondering if anyone knew of a good combination and was willing to share with a newbie :p

    edit: Oh, and will this overwrite permissions, I hope? for instance, those who can't normally /home... can they use an alias with /home in it?
     
  27. Offline

    DeanDip

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    You can make users have the ability to use any command an OP can use. A way to do that would be:
    safe:/h = runas(~op, '/home')
    and then they would need the permission: commandhelper.alias.safe

    The label doesn't have to be safe, it could be something else like default or blah, but it does need a label and a permission to go with the label so that they can use the restricted command runas()

    Some plugins don't let OPs have access to every command, so sometimes it's not possible unless there's an admin on that they could run as.
     
  28. Offline

    QQCucumber

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    CommandHelper doesn't appear to like repeating commands with /. that have double slashes, which is odd because most of your plugins use double slashes.
     
  29. Offline

    anon

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Sorry bein a newfag, but how to do a /each command as I used to do on hmod plugin?
     
  30. Offline

    MrMagical

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Code (Text):
    1. /each $group $ = foreach(all_players(), @player, if( or( equals($group, '*'), array_contains(pgroup(@player), $group)), runas(player(), replace($, ^, @player))) )
    Usage: /each <group> <command>
    Runs <command> once for every online player in <group>, replacing ^ with the player name.
    Use * as <group> to mach all online players.

    Example: /each Admin /me loves ^
    Love all online admins
     
  31. Offline

    BaconFace

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    I get the message, "unexpected newline" when attempting to do anything, really. My config.txt has one line:

    /rank $data1 $data2 = /manselect world \ /manuadd $data1 $data2 \ /manselect mainworld \ /manuadd $data1 $data2 \ /manselect survival \ /manuadd $data1 $data2 \ /manselect planetoids \ /manuadd $data1 $data2

    (all on one line)

    Is it a problem with my script, the plugin, or an incompatibility with another plugin?
     

Share This Page