ScriptExec
ScriptExec
NOTICE
There has been a bug in this where an error would be thrown when using permissions and parameters. This is now fixed.
Introduction
Have you ever wanted to execute shell scripts through minecraft? Well, this can do it. This plugin started out when I was trying to do a /restart command. However, the panel from my hosting company doesn't have a custom startup script option. But, it does have an api. I couldn't find any plugin that could do what this plugin could do, so I made it.
Dependencies
- Vault: required for permissions to work.
- CraftBukkit 1.7.2-RO.3+ required.
Features
- Execute shell scripts with optional parameters
- Uses permissions
- Reports back if the shell command/file exists
- Prevents use of multiple shell commands through parameters
Planned Features
- In-game command to add scripts
Permissions to use parameters to scriptsDonePrevention from running multiple commands through parametersDone
Installation
Download the plugin and put it in your plugins folder. By default, it will turn itself off if you do not have Vault. Vault is required for permissions to work. If you would like to use it without Vault and give everyone permission to every ScriptExec command, turn off the "require-vault" option in the config.
Configuration
By default, the config will look like this:
# default config.yml - ScriptExec by lights0123 require-vault: true scripts: example: path: ./example.sh
Warning:
Do not change the "path" value without knowing what the command does. You can easily destroy your server by changing the commands to the wrong value.
The "path" is what it will run when invoked (you can put single-line commands in there). In there,
| Name | Description |
|---|---|
| require-vault | If set to true, this plugin will turn itself off if vault is not detected. |
| scripts: | The "scripts" category. |
| example: | The name of the script. |
| path: | The path to the file it will execute. |
You can use multiple commands, for example:
# default config.yml - ScriptExec by lights0123 require-vault: true scripts: example: path: ./example.sh thisisanotherexample: path: ./example2.sh
Commands & Permissions
| Name | Permission | Description |
|---|---|---|
| /scriptexec | scriptexec.info | View information about ScriptExec. |
| /scriptexec reload | scriptexec.reload | Reload the configuration file. |
| /scriptexec execute <name> | scriptexec.execute.<name>, scriptexec.execute.* | Execute a script. |
| /scriptexec execute <name> <param1> <param2> etc... | scriptexec.execute.<name>.params, scriptexec.execute.*.params | Execute a script with parameters. |
Use scriptexec.* to allow all commands. Note: You can use /se instead of /scriptexec for all commands.
Examples
Other
Source
Source code is available under GitHub.
PluginMetrics
This plugin uses PluginMetrics. All data sent is anonamyous and is available at mcstats.org. If you wish to opt out, change "opt-out" in plugins/PluginMetrics/config.yml to "true".

-
View User Profile
-
Send Message
Posted Mar 5, 2015An error in the code source , replace line 37 (CommandExecutor.java) with :
if(params&&(!perm(sender,"ScriptExec.execute.*.params")&&!perm(sender,"ScriptExec.execute."+args[1]+".params"))){
and it will fix the problem of Rayscon
-
View User Profile
-
Send Message
Posted Oct 26, 2014Hello,
The parameters donsn't work ?
When I use this, the server tell me : ' You do not have permission to use parameters for the command ./script.sh'