MultiCommand
Hello together!
This is a plugin that executes many commands with one simple command that can be configured. You can add parameters and define shortcuts like /t can execute /time.
Uses Metrics for sending completly anonomous data to http://mcstats.org for usage tracking. See mcstats.org and GitHub for more info.
Installation:
- Copy MultiCommand.jar in /plugins/
- Restart/reload server
Configuration/Usage:
- Creating a new command list:
- Type /muco create <name>
- Then add your commands with /muco add <name> <command>
- Important:
- Type your first command for executation first.
- Don't forget the /. If you execute the command list via console, the slash will be removed automatically
- Now type /muco <name> and the commands will be executed one after one.
Executing commands:
- Type /muco <name> - Requires MultiCommand.use.<name>
List all lists of commands:
- Type /muco list - Requires MultiCommand.list
List all commands in a list:
- Type /muco show <name> - Requires MultiCommand.show.<name>
Remove a command from a list of commands:
- Type /muco remove <name> <command with /> - Requires MultiCommand.remove.<name>
Delete a list of commands:
- Type /muco delete <name> - Requires MultiCommand.delete.<name>
Reload the config:
- Type /muco reload - Requires MultiCommand.reload
Parameters and variables:
One simple example:
- Type /muco create exampleList - Requires MultiCommand.create.exampleList
- Then: /muco add exampleList /time set $1
- Maybe: /muco add exampleList /say $1 $2
- Executation: /muco exampleList testVariable1 testVariable2
You can add $1, $2, $3, $4, $5 as variables for default. If you change the value for 'maxvariables' in the config.yml, you can define more than 5 variables.
Optional parameters:
You can define parameters as optional. Have a look at the following examples:
- /muco add exampleList /command $1 [$2]
- $1 is required, $2 is optional
- /muco add exampleList /command [$1] [$2]
- $1 and $2 are optional
- /muco add exampleList /command $1 [$2] $3 This doesn't work!
- This doesn't work. It will print out an error.
- /muco add exampleList /command $1 [$3] $2
- $1 and $2 are required, $3 is optional
- If you want to execute this you have to type:
- /muco exampleList $1 $2 [$3]
I hope this understandable.
Predefined variables:
- $playername : The name of the player that executes the command
- $playerworld : The current world of the player that executes the command
- $serveronlineplayers : Players, as a number, that are online
- $servermaxplayers: Slots of the server
Delays:
- You can add delays to commands in a list
- Just put "[time in seconds]" in front of a command (without "")
- Example:
- /muco create testlist
- /muco add testlist /say 3
- /muco add testlist [1]/say 2
- /muco add testlist [1]/say 1
- /muco add testlist [1]/stop
- The output will be a countdown from 3 to 1 and after it the server will stop
Executing commands as console:
- You can explicitly executing a command as console
- Just put "[$c]" in front of the command (in front of the delay, too) and the command will be executed as console
- Examples:
- [$c]/say I'm the console.
- [$c][2]/say I'm the console and I knew this message 2 secs before you saw it.
Disabling commands:
You can prevent commands from being execute outside of mucos. But you can use it for disabling commands in general, too.
- Disable a command: /muco disable disable <command with slash> - Requires MultiCommand.disable.disable
- Reenable a command: /muco disable enable <command with slash> - Requires MultiCommand.disable.enable
- List all disabled commands: /muco disable list - Requires MultiCommand.disable.list
If you disable /say the commands /say hey, /say omg etc. will be disabled, too.
If you disable /say hey the command /say hey you, /say hey all etc. will be disabled, too, but not /say hi.
The players with the permission MultiCommand.ignoreDisabledCommands will not be effected by disabled commands.
Allright? ;)
Shortcuts:
Now supported on console :)
- Open the config.yml in /plugins/MultiCommand
- Edit the properties in Shortcuts
- One Example:
Shortcuts: t: time kill: ban
- If you now type /t set 13000, the command /time set 13000 will be executed
- That means everything you type after /t will be added behind /time
- Note: This can override existing commands!
- Permissions will be checked by the plugin that provides the command!
Other Permissions:
- All Permissions: MultiCommand.all
- Create all: MultiCommand.create.all
- Delete all: MultiCommand.delete.all
- Show all: MultiCommand.show.all
- All major permission systems supported
Please consider donating using the following link:
Excellent plugin! Would it be possible to add command cooldowns to the next version release?
This plugin helped me SO much with protecting regions on my server. My staff and me want to that you. Redfreak Crafted Server now uses this plugin as it's number 1 "Protection" plugin if you get what I mean. redfreakcraftedserver.servegame.com.
Awsome plugin! Please don't abonden it!
@Icefuzion
There is, it just isn't listed with the others at the end. There are a lot of other permission nodes listed after each feature. Here:
Executing commands: Type /muco <name> - Requires MultiCommand.use.<name>
So just use Multicommand.use.<name> or Multicommand.use.all to give players access to certain shortcuts.
But I have a question about the shortcuts.
"Note: This can override existing commands! Permissions will be checked by the plugin that provides the command!"
How do you override an existing command? I want my players to have access to a /muco command to enchant, but not be able to use the normal enchant command. If I disable the enchant command then the /muco command is also disabled, and the shortcut doesn't override the existing command. Any help?
All I need is a simple permission node to allow my players to use a certain shortcut (or all of them).
Why isn't there one? The only permissions nodes you are listing are the admin permissions, create, delete and show permissions. My players shouldn't have access to any of those...
@quillis123
http://dev.bukkit.org/server-mods/multi-command/tickets/16-server-command-event-error-is-spamming-console/
@FatPap
Lower than 1 second ? No, this is currently not supported because MultiCommand calculates with integers. I do not expect this to be integrated the next time because I don't think it is that important.
is it possible to have delays lower than 1 second?
I'm not having any problems in-game with this plugin; everything is working fine. However I keep getting this error in the console: http://d.pr/n/RdbD (link because the format was hard to read)
I just thought you might want to look into this, and it is also spamming up my console :3
i dont get this :/... can someone expalin??
Thanks for adding console command execution! :)
@BlindC0der
See http://dev.bukkit.org/server-mods/multi-command/tickets/13-playername-in-the-console/ ;)
Hey nice Plugin! But when i run a command as console via Multicommand the $playername is "console". So i cant user $playername in commands with [$c]
@DJTomek
I think you get the display name of the player. Just switch in the config the usePlayerDisplayName value from false to true and you will get the player name and nothing else.
@levisn1
This error is not caused by MultiCommand. I don't know which plugin handles those commands (I think it is WorldEdit), but this is the reason why it does not work. Try adding [$c] in front of each command. This will execute every command as console.
i have to execute this 3 commands:
1. //pos1 -304,70,214
2. //pos2 -310,67,223
3. //set 1%56,50%48,20%16,4%14,5%15,15%73,5%21
so i have used this command /muco add miniera //pos1 -304,70,214
so i have used this command /muco add miniera //pos2 -310,67,223
so i have used this command /mucco add miniera //set 1%56,50%48,20%16,4%14,5%15,15%73,5%21
but when i do /muco miniera i have this
18:00:28 [INFORMAZIONI] Command could not be handled; invalid sender!
18:00:28 [INFORMAZIONI] Command could not be handled; invalid sender!
18:00:28 [INFORMAZIONI] Command could not be handled; invalid sender!
solution?
How I can write nick, who type command and without any space place another word? I have a regions and I want to use exactly this, without spaces:
- /region addmember $playernameisland
But I can't... Region is always <nick>island and I don't have any idea with this...
@HomerBond005
Now that I've made a ticket, will you consider fixing this? I would love if you did so.
@HomerBond005
Sorry, I will try better next time, I promise :)
@deleted_9101167
Ticket please.