There has been a bug in this where an error would be thrown when using permissions and parameters. This is now fixed.
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.
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.
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
| 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.
Source code is available under GitHub.
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".
