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 scripts Done
  • Prevention from running multiple commands through parameters Done

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,

NameDescription
require-vaultIf 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

NamePermissionDescription
/scriptexecscriptexec.infoView information about ScriptExec.
/scriptexec reloadscriptexec.reloadReload 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.*.paramsExecute a script with parameters.

Use scriptexec.* to allow all commands. Note: You can use /se instead of /scriptexec for all commands.


Examples

Click here for 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".
ScriptExec Stats


Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

Categories

Members

Recent Files

Bukkit