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 set my playerDisplayName to false but it didn't work...
I'm trying to use TakeItem plugin so whenever a player left-clicks the blaze rod (pt) it will kitty cannon and use /takeitem but this doesn't work, a somewhat error has generated.
[13:08:39 WARN]: [MultiCommand] Task #10918 for MultiCommand v2.2.1 generated an exception
org.bukkit.command.CommandException: Unhandled exception executing command 'take' in plugin TakeItem v0.1
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spigot.jar:git-Spigot-7d78b81-f709362]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[spigot.jar:git-Spigot-7d78b81-f709362]
at org.bukkit.craftbukkit.v1_11_R1.CraftServer.dispatchCommand(CraftServer.java:650) ~[spigot.jar:git-Spigot-7d78b81-f709362]
at de.homerbond005.multicommand.MultiCommand$3.run(MultiCommand.java:411) ~[?:?]
at org.bukkit.craftbukkit.v1_11_R1.scheduler.CraftTask.run(CraftTask.java:71) ~[spigot.jar:git-Spigot-7d78b81-f709362]
at org.bukkit.craftbukkit.v1_11_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:353) [spigot.jar:git-Spigot-7d78b81-f709362]
at net.minecraft.server.v1_11_R1.MinecraftServer.D(MinecraftServer.java:730) [spigot.jar:git-Spigot-7d78b81-f709362]
at net.minecraft.server.v1_11_R1.DedicatedServer.D(DedicatedServer.java:399) [spigot.jar:git-Spigot-7d78b81-f709362]
at net.minecraft.server.v1_11_R1.MinecraftServer.C(MinecraftServer.java:675) [spigot.jar:git-Spigot-7d78b81-f709362]
at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:574) [spigot.jar:git-Spigot-7d78b81-f709362]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101]
Caused by: java.lang.ClassCastException: org.bukkit.craftbukkit.v1_11_R1.command.ColouredConsoleSender cannot be cast to org.bukkit.entity.Player
at me.liec0dez.TakeItem.TakeItem.onCommand(TakeItem.java:24) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot.jar:git-Spigot-7d78b81-f709362]
... 10 more
@SupremeAdmiralZ
Set playerDisplayName to false to use $playername in commands
I set up a MuCo command to be the following: BossGoldKilled: - /give $playername 2260 - /tp $playername 29974 72 29950 However when I execute this on the console I get two errors saying "Error: Player Not Found". I have also tried replacing $playername with @player, and have tried both methods on my client in-game, with the same result. What is wrong?
@HomerBond005
Really Good made! I use it for an Lobby Command because its a multiworld server- 1.Cmd:/Bw leave 2.Cmd:/sg leave 3.Cmd:/1vs1 leave 4.Cmd:/mv tp world(lobby)
I love it! Thank ya
Hi!
I am enjoying that i can use this plugin! It's very useful.
I have one question: it possible to add something like autofill player name with TAB? When I am using basic plugins its okay but when i try command from your plugin it's impossible Maybe i do something wrong?
Thanks from mountain! (yep, it's our polish joke. It's means thank you in advance) :) Martyna
@Hurkus
Executing a command as OP requires an OP to be online. If no OP is online, I can't do this. This would make the whole thing a lot more complicated. That is the reason why I only added Console command executation (because the console is always online ;) )
Is there a way to execute the list of commands as OP. Some plugins don't support commands beeing executed from console but only from player.
@spideraid
I don't know what you want to achive but maybe this will help:
You can use $1 to create a parameter. That means if you execute your muco like: /muco test player it will replace every $1 inside the commands with player
@BloodyTech17
Of course ;)
@Adrimuvi
It is possible to execute commands as console. This is a bit like executing as op but not the same
you can execute as OP¿
I need to know how to make a muco to moderate to a person eg muco add / bc & A & L (person to whom I address) Moderate your language - (I).
In reply to _ForgeUser20772777:
e need to know this!!!!
Keep it up to date please!
@BloodyTech17
/trabaho* xD
Can I use shortcuts for translating? Example: /jobs and it's shortcut: /trabajo
@bry5318
Try using tickets here on Bukkit Dev :D
@cnkruger
You want the console to execute the command and create an hsphere around a player? I think that is not supported by WorldEdit. If you do not want to give the permission for hsphere to the players, please read the notice to permissions (my reply to lorderikson) below this comment.
@lorderikson
I'm not quite sure if that's the answer you're looking for but I'll give it a try: MuCo is programmed to execute commands in a row. I can't control the permissions, because every command is individual. It may require different execution parameters (not these parameters you set like this: /command param1 param2 ..., but internal Java parameters). To match all these requirements, I have to execute the command as a player. If this player do not have the required permissions it won't work.
I dont really understand why you didnt add the feature to use the command on someone else... Thats almost half the purpose of this command. /muco <name> <playername> is so important, yet, u dont have it lol. I'm getting rid of this plugin.