CommandHelper
CommandHelper lets you and users alias commands so that you don't get carpal tunnel, and it also allows you to script your own plugins without Java knowledge.
- Let you or users bind aliases for multiple commands
- Using an easy to use language MethodScript, script your own plugins
- Completely replace whatever you are using for /homes /warps /mail etc. with CommandHelper
- Create new features, handle new problems, without having to learn Java
- Easy to use language to pick up, with great documentation
Want an easy to use in-game map editor? Try WorldEdit. Want to protect areas? Try WorldGuard.
For the latest version: This page is not updated. For the latest builds, get them from the Downloads page.
Getting Started
Installation |
---|
Bukkit is currently required.
- Download CommandHelper and put the .jar into plugins/.
- Run your server once to generate the configuration files.
- Read the wiki (see below) to find out how to use CommandHelper.
Documentation |
---|
What are the permissions? How do you make your own scripts?
All the documentation can be found at https://methodscript.com/docs
Learning More |
---|
- Project leader: LadyCailin is the current project leader
- Lead developers: LadyCailin
- Project started: In November 2010 (Bukkit was started January 2011)
The original project leader and lead developer was sk89q.
Development builds of this project can be acquired at the provided continuous integration server. These builds have not been approved by the BukkitDev staff. Use them at your own risk.
THE COMMENTS ON THIS PAGE ARE NOT REGULARLY MONITORED. For faster support, please join us on IRC or Discord.
@UbuntuFreak
It's a new feature that hasn't been released yet, so the current stable versions don't have it.
Does it still work in 1.2.5?
@wraithguard01
So does that mean the set_timeout function will be removed if I'm not running a development version?
@xIGoDz
You can use the set_timeout function if you're running a development version.
@np98765
Nope, there will be no unforseen consequences by using runas(op) with a hardcoded command. It will run only that command as op, no others. It doesn't *quite* work like this, but you can think of it as working exactly like this: 1. Op the player. 2. Run the one command. 3. De-op the player. There are other security precautions though, so for instance, if the server crashes in the middle of running the command, and step 3 doesn't run, they won't get "stuck" as op, the runas(op) command is a bit of a hack so that there are no permanent changes to the op list. Because of this, there's no need to give them any other permission nodes, this is the unix equivalent of sudo, except it's much more granular.
Hey this plugin works great but I have one question.
How do i add a delay between multiple commands. Example:
/test = >>> /save-all /stop <<
(How do i add delay between them?)
Hello,
If I want to give players permissions to use /market = /warp market, what can I do?
I've heard I can give then runas permission, and ass runas op. my question is, does this have any "consequences"? Can they use any other commands, or children commands/nodes, or anything?
Is there anything else I can do, to give temporary nodes individually?
@wraithguard01
Oh wow, forgive my retardness. After re-re-re-re-rereading your reply I finally got the whole picture, many many thanks for the reply - and please blame the fact that english isn't my first language. :>
@wraithguard01
Thanks for your reply! I have given it the label (reqreward), but even if I haven't given them the alias's permission they can still use it - that's the issue I'm having. :)
Basically it ignores wether or not people have ch.alias.reqreward, and just fires away the command.
@Kapten_Knas
Generally speaking, you should be giving out the commandhelper.func.use.* permissions, because that applies to all commands, regardless. The way the permission labels work allow you to have much more granular control over who can have permissions, but they only work by adding more permissions, they don't take them away. So a command that doesn't use any restricted functions, say: /me = msg(player()) doesn't need a label at all, because msg and player are unrestricted functions. The runas function is restricted, so by default, players can't use it, so you need to add permissions to the command by labelling it, and giving them permission for that label.
@UbuntuFreak
Many thanks for the reply. Unfortunately, that command would make the "Teacher" typing the command recieve the message - not the player supposed to hand out the reward. The actual command is working very well, the problem I'm having is that it can be used regardless if you have "commandhelper.alias.reqreward" or not.
Thanks again though! :)
@Kapten_Knas
Try this (no warranty because it's the same as you command): pastie
Make sure you give the ch.func.use.runas and ch.func.use.msg permission.
Due to stubborness I've almost torn all my hair out, and I'm now giving up. I've written an alias where "Teachers" can guide players, and if they're satisfied they'll get asked to reward. The command itself is very simple.
reqreward:/reqreward $name = runas(~console, /pex user $name timed add 'essentials.give' 15) \ /msg $name 'You have 15 seconds to reward your Teacher with /reward <name>.' \ /msg $name 'Only reward your Teacher if youre satisfied with the guidance.'
Now the problem is permissions, I've given permission to use runas but not the reqreward one but they're still able to use it regardless. All help is appreciated! :)
EDIT: Using latest CMDH dev and latest recommended PEX.
@redbingo
Seems to be an error in the import/export function. Unfortunately I don't know how to use them.
It doesn't say. It just sais in config.txt: Incorrect number of arguments passed to import; Compile error in script. Compilation will attempt to continue, however.
@redbingo
Can you please post the compile error? I can't help you without :(
@np98765
It sounds like the warp plugin is what is giving you the permission error, not CH. You are right to use runas(op) to fix that, but because runas is a restricted function, you then have to also deal with the CH permission. Easy enough, just give the command * like I said earlier. It doesn't give the user any extra permissions, it's just a shortcut to saying "all users can run this command". The alternative is to give it a normal label (say, "safe") and then giving the user commandhelper.alias.safe. Using * just is easier, if it's meant for all users anyways.
@domingo15
There is not yet, but more events are being added, so that will probably be possible soon.
@redbingo
That means that you have an error in your script. Read the error, and it should tell you in reasonably plain english what the problem is. If you still can't figure it out, post the error message, and relevant code snippet, and I'm sure we can figure out the problem.
@redbingo No, a text editor is all that's needed. (notepad plus plus is recommended, especially when combined with a syntax highlighter for CH) The if() function supports 2-3 arguments.
@UbuntuFreak
Hey, thanks so much! :D
Also, it says theres a compile error and there is an incorrect number of arguments. Do i need a compiler or something?
@redbingo
You used a wrong syntax for the if() condition :) You used: if() { } else { } what is very PHP like even if it doesn't have to be PHP. The correct syntax is if (condition, that happens when true, that happens when false).
My suggestion to use pgive_item is only to avoid chat spam. When using the vanilla /give command, it's broadcasted to everyone what item is given to what player. pgive_item gives the items quietly (doesn't broadcast anything)
The correct syntax would be: here I have not tested this script but I have credensed it working. :)