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:
Oh noes! If you put things in the config like
Command: - '[$c]/broadcast I heard $playername is cool'
It ends up as [Broadcast] I heard Console is cool
Instead of [Broadcast] I heard (the player who typed /muco command) is cool
Could you please make it so that the player who typed the command is $player and not the console?
Thank you! I should have read all of that first.
@notif
Just read the usage above. I'm sure you will find delays.
With SpamGuard, we get "Do not send more than 1 command per 200 ms." Which means that MultiCommand instantly sends the real command after the player types in the alias one? Perhaps a fix would be adding a delay option?
@kustomcraft
See http://dev.bukkit.org/server-mods/multi-command/tickets/11-warning-multi-command-failed-on-update-check/. I already received this problem, just disable "updateReminderEnabled" in your config and you won't see this error again.
ena 'default'. 15.10 11:27:55 [Multicraft] Skipped 62 lines due to rate limit (30/s) 15.10 11:27:54 [Server] SEVERE at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:276) 15.10 11:27:54 [Server] SEVERE at net.minecraft.server.MinecraftServer.i(MinecraftServer.java:297) 15.10 11:27:54 [Server] SEVERE at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:248) 15.10 11:27:54 [Server] SEVERE at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:266) 15.10 11:27:54 [Server] SEVERE at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:381) 15.10 11:27:54 [Server] SEVERE at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:374) 15.10 11:27:54 [Server] SEVERE at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217) 15.10 11:27:54 [Server] SEVERE at de.HomerBond005.MultiCommand.MultiCommand.onEnable(MultiCommand.java:84) 15.10 11:27:54 [Server] SEVERE at de.HomerBond005.MultiCommand.Updater.<init>(Updater.java:33) 15.10 11:27:54 [Server] SEVERE at java.net.URL.openStream(URL.java:1035) 15.10 11:27:54 [Server] SEVERE at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1296) 15.10 11:27:54 [Server] SEVERE at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:846) 15.10 11:27:54 [Server] SEVERE at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:928) 15.10 11:27:54 [Server] SEVERE at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:992) 15.10 11:27:54 [Server] SEVERE at sun.net.www.http.HttpClient.New(HttpClient.java:316) 15.10 11:27:54 [Server] SEVERE at sun.net.www.http.HttpClient.New(HttpClient.java:300) 15.10 11:27:54 [Server] SEVERE at sun.net.www.http.HttpClient.<init>(HttpClient.java:213) 15.10 11:27:54 [Server] SEVERE at sun.net.www.http.HttpClient.openServer(HttpClient.java:483) 15.10 11:27:54 [Server] SEVERE at sun.net.www.http.HttpClient.openServer(HttpClient.java:388) 15.10 11:27:54 [Server] SEVERE at sun.net.NetworkClient.doConnect(NetworkClient.java:180) 15.10 11:27:54 [Server] SEVERE at java.net.Socket.connect(Socket.java:528) 15.10 11:27:54 [Server] SEVERE at java.net.Socket.connect(Socket.java:579) 15.10 11:27:54 [Server] SEVERE at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391) 15.10 11:27:54 [Server] SEVERE at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) 15.10 11:27:54 [Server] SEVERE at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) 15.10 11:27:54 [Server] SEVERE at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) 15.10 11:27:54 [Server] SEVERE at java.net.PlainSocketImpl.socketConnect(Native Method) 15.10 11:27:54 [Server] SEVERE java.net.ConnectException: Connection timed out 15.10 11:27:54 [Server] WARNING [MultiCommand] Failed on connecting to inceptolabs.hopto.org 15.10 11:27:54 [Server] WARNING [MultiCommand] Failed on update check! Please check your Internet connection and your firewall!
@spikefacha
It is "MultiCommand.ignoreDisabledCommands". Sorry, forgot it in the description.
what is the permisson to byppass disabled commands?
@DanielYRH
If you use PermissionsEx, it is as simple as
pex user <user> timed add MultiCommand.use.<name> <lifetime in seconds> [world]
AMAZING PLUGIN!!!!
One quick question, is there any way i can assign temporary permissions for a certain command?
ok, thanks!
/Danielrh
srry but version 2.0 is so slow, you need like 5 minutes so server can start, 1.8.1 still works better than 2.0
@NICEXDD
I'm not sire what the command /plotme home does, but in fact it seems like your server does not load the chunk at this position. You could try adding the new delays like they are described above.
I have problem with 2 commands of teleport in the same time.. In /dom i have two commands /warp plot and /plotme home.. so when i say /dom its kill player.. Feel out of the world.
Whats wrong ? Sory for my English, but I am Polish :)
@HomerBond005
<3 Muco
@RiotShielder
Ver 1.8 works perfectly fine for 1.3.1
Could you please update to 1.3.1
@HolySteward
Predefined strings? Why don't you just write down the text in the command? If you really want to have the feature (I don't know why) create a ticket with more informations please.
Can you make it support strings? so that say: - /say $playername: $s1
or something could work effectively?
@HolySteward
Please create a ticket.
Edit: Uups you already did. Sorry!
@Kartikitrak
I'd like to see the source code of HeroChat but in fact there are only old versions online. Please create a ticket for this error and put it the details you mentioned.