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:
I tried to make a command that would spawn a hollow sphere around a player when they used a command but i have no idea how to have console run the command on the player at the moment im trying to do ... /muco add shield [$c] //hsphere 95:3 3 and /muco add shield [$c] $playername //hsphere 95:3 3 //hsphere is a worldedit command
I really don't understand how to enable command when their used with muco, i try with Permissions: false but don't works ... Could you explain me how i can do that ? Commands are disable with PermissionsEx, i don't want they use it individualy
@HomerBond005
Thank you so much!! Great plugin!
@Sprindex
Multiple commands at once is never possible. But I'm rather sure that you do not need to execute the commands "at once". You just want to execute them in a row and that's exactly what MuCo is designed for. Just use /muco create <list>, and add the manuadd commands with /muco add <list> /manuadd ... . You can use the name of the executing player via $playername or use an argument via $1.
Hey HomerBond005,
I want to run multiple commands for groupmanager at once. I just wanted to know if this was possible. Basically I'd want to run:
manuadd <player> Citizen world manuadd <player> Citizen world_nether manuadd <player> Citizen world_the_end manuadd <player> Citizen skywars manuadd <player> Citizen hub
I'm not sure whether it's possible or not because, from what I read above, you won't be able to specify the player name.
Thanks,
Jack
@Chiiffon
Use the "playerDisplayName" toggle in the config.yml to switch to player name only. This should solve your problem
I have my prefix and name [Owner] *name ,when I do $playername, it said player [Owner] not found
Greetings. Is there any chance that you add forceop to the plugin?
Hello, I've got a little problem with this Plugin. What I try to do is that as soon as someone clicks on a sign which leads to the command /muco fly he will be able to fly for 30 minutes. Everything works well apart from the relog. These 30 minutes are achieved by putting a delay of 1800 seconds, but as soon as this player logs out it will not continue this delay and the user has the fly permission for ever. Is there a different way to achieve these 30 minutes or can you make the delay counter save on log-out?
Thanks for your help
@Djimusic
I think you'll receive another exception when loading/enabling the plugin. The exception you can see at the moment is caused by a malfunction when loading the plugin. Try deleting the comfig and reloading the server.
@ProxyBomb
@Kyfwana
I will fix it in 1,5 weeks when I'm home again. Sorry for being inactive so long.
Repeating ProxyBomb's complaint:
$playername fails because it includes the player's prefix.
Hello, I am having an internal error appear when using this plugin. In the console, this pops up with a lot of INFO tags. The message link is below. Can you please tell me what I should do to fix this?
http://pastebin.com/9gDQB6bt
@Kyfwana
I'm sorry having told there wouldn't be such a permission. Of course MultiCommand.use is the permission for executing lists. The delays aren't persistant on reloads or reboots. That would cause to much "configuration file traffic". If you activate OP only you do not have to setup permissions and MultiCommand will check if the player is OP.
:/ Damn it
with $playername i hate it when you have a prefix on your name... it'll say your name with prefix so when you do /muco add <name> [$c]/tell $playername <Message> then in console it says: could not find &4[Admin]&2ProxyBomb WHY :C
@HomerBond005 If MuCo does not provide permissions for executing lists, that raises two questions. 1) What is the purpose of multiCommand.use <name>. 2) How can we limit certain lists to be usable by only certain players whom are not OPs?
Permissions are used to restrict what elements of the plugin?
And an unrelated question.
Are delay countdowns persistent across server shutdowns/restarts, and can they have very long values such as 48 hours?
@Kyfwana
MuCo does not provide a permission for executing lists. All commands are executed in the specific order regardless of any errors or permission fails in the commands. The permissions value in the config can switch to OP-only, if necessary. If it is set to true it means that permissions are used, not OP-only.
[/code]Will a player be able to successfully execute every command in a list by executing the list, whether or not they have the permissions for the individual commands in that list, as long as they have the permission to use the list itself and each command in it is preceeded with [$c]? Is that correct?
The below issue has apparently been resolved. Leaving text up to help others:
Uh-oh. Problem. All players in every group have access to every muco list. They can execute any one of them by typing /muco <listname>. How do I prevent certain groups from using those lists? I'm using Group Manager, and no one has any permissions except Moderator Group. Are there settings in the config file to address this problem? I see there is a "permissions" variable set to "true", is that the correct value for that variable. EDIT: Apparently this problem was caused by having the server in offline mode for testing.
@1337ingDisorder
Do you mean cooldowns like "you can execute this command in 2 hours again" or something like that ? Please specify your wish in a new ticket. Thanks :)
EDIT: Have a look at this ticket: http://dev.bukkit.org/bukkit-plugins/multi-command/tickets/17-command-locking/