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:
@SmashboxGaming
Yes, that sounds good. I was in vacation for the last two weeks so I have so many tasks to do. Please create a ticket so that I could work at the tickets consecutive. Thanks for your suggestion!
Hello. I currently have herochat and faction on my server however I couldn't figure out how to make a channel in herochat for alliance chat or faction chat. So I decided to use your plugin. I made a shortcut for /ch f to run the command /f c f and similiarly /ch a to run /f c a. You stated that this plugin will override other plugin commands and any /ch command is checked by herochat to see if the channel name is in the channel list. However herochat is still checking it. So it is not overriding it. Also it doesn't run the command. I'm OP btw.
@HomerBond005
Or even just CommandBlocker support would be great. Giving people the ability to bypass commandblocker cmd's via your muco. :) http://dev.bukkit.org/server-mods/commandblocker/
@HomerBond005
GREAT plugin, question however. I am trying to execute multiple commands with your plugin however I don't want them to be able to execute them individually. You know of a good alternative?
EDIT: If you could make an option that would bypass a permission check, similar to command signs, etc, that would be amazing. I'd even donate for the feature.
Is it possible to add a delay between the commands in the list? and if so, how?
@dandelion02
Of course.
@jelliton
Yep, that's possible.
@deleted_9101167
The variable is called playername. If it gets the playername that is formatted wirh essentials try switching the playerDisplayName value in the config.yml to false. If it doesn't work don't worry, after my vacation I'll try fixing it.
can i have my variables mushed together with a word? so it would have /region claim plot$1 on /muco region and i executed /muco region 1 it would execute /region claim plot1 and /muco region 2 would execute /region claim plot2, etc. etc.?
Could you please add something like a parameter which is the players name? So that we can do a broadcast like this: /day = /muco day = /time day & /broadcast [Player] set the time to day!
And maybe some kind of message feature so that the player gets a defined message when using a command.
Thaanks! :)
Is there a way to put a time space between the commands? For example, I want /muco shutdown to execute the following: "/broadcast Server shutting down in 10 seconds. Please disconnect. <wait 10 seconds> /kickall Server shut down /stop"
Is this possible?
@Hans6666
Please read the description before posting such a question.
Executing commands:
You see, the permission MultiCommand.use.<name> is required. You can give them MultiCommand.use.all or MultiCommand.use.*.
i created a multicommand called /pball it executes the commands
/pb lobby and /pb random
but my members cant use /pball because they dont have the permission, which permission do they need? MultiCommand.show.all ????? they only should be able to execute command lists....
@gabessdsp
Are you sure that you are running v1.7.1? If you are running that version, please create a ticket.
@kustomcraft
Hmm. Did you reload? Please create a ticket.
When I do /muco reload it just tells me that "List reload doesn't exist"
I have tried both with playerDisplayName: true and false, but both fail its still collecting essentails name :S
@jelliton
Yep, that's right :)
So what your saying if i put "/npc create $1" and "/npc owner $1" and i executed it with "/muco makebd bodyguard". "/npc create $1" would turn into "/npc create bodyguard" and "/npc owner $1" would turn into "/npc owner bodyguard"? I'm using your plugin to make creating bodyguards a one step process :D
@jelliton
Let's make an example: This is not that useful but okay.
At first we create a muco list: /muco create greet
Then we add the command msg with a variable: /muco add greet /msg $1 Hello!
If you want to execute /muco greet it requires an argument. For example: /muco greet admin
If you type in this command, it will execute the following: /msg admin Hello!
If you add another command: /muco add greet /say I greeted $1!
And you execute /muco greet admin
It will execute /msg admin Hello! and /say I greeted admin!