ConsoleScript
ConsoleScript gives players the power to create runnable scripts. Scripts are created in the config or in-game via commands. Scripts use various built-in functions which are being added as a need arises. This plugin was originally privately created for a prison server, but I hope anyone who wishes will find use in this plugin.
Available Functions:
- command runs a command with a Console sender.
- broadcast broadcasts a global message to the entire server.
- timer waits for a given period of time (Time is in ticks. 20 ticks = 1 second).
- loop stops the script at that point and re-runs it from the beginning.
- WARNING: Looping a script without any timers (to delay the loop) will most likely crash your server! It will try to run the same script over 20 times per second! Be very careful with this function! It must be delayed.
Permissions:
- consolescript.help /cscript help
- consolescript.list /cscript list
- consolescript.reload /cscript reload
- consolescript.save /cscript save
- consolescript.view.[script] OR consolescript.view.* /cscript view [script]
- consolescript.run.[script] OR consolescript.run.* /cscript run [script]
- consolescript.running /cscript running
- consolescript.stop.[script] OR consolescript.stop.* /cscript stop [script]
- consolescript.delete /cscript delete [script]
- consolescript.edit.[script] OR consolescript.edit.* /cscript edit [script]
- consolescript.create /cscript create [script]
Commands:
- /cscript view plugin info.
- /cscript help view a list of all commands.
- /cscript list list all available scripts.
- /cscript run [script] run a script.
- /cscript running view all running scripts.
- /cscript stop [script] stop a script.
- /cscript stopall stop all scripts and cleanse the plugin (easy fix for bugged running scripts). (NOTE: Permission for this command is consolescript.stop.*)
- /cscript view [script] view all lines in a script.
- /cscript edit [script] edit a script (see detailed use below).
- /cscript create [script] create a new script (see detailed use below).
- /cscript delete [script] delete a script.
- /cscript save save changes to the config and all scripts.
Editing Explained:
Editing is fairly complex feature. When editing, scripts are edited 1 line at a time. You can view all lines of the script by using /cscript view [script].
Editing has 3 modes:
- Editing a preexisting line. (denoted with an 'l')
- Adding a line. (denoted with an 'n')
- Deleting a line. (denoted with a 'd')
To edit a preexisting line, type /cscript edit [script] l [line number] [text/function to be placed on that line]. A success message will be received upon proper completion.
To add a line, the line must be added after a preexisting line OR placed at the beginning using the line number '0' OR appended to the end using the line number 'e'. To add a line type /cscript edit [script] n [line for new line to be placed after] [text/function to be placed on that line]. A success message will be received upon proper completion.
Deleting a line is simple. Type /cscript edit [script] d [line number]. A success message will be received upon completion.
/cscript save must be run after editing a script in order to save the edits.
Creating a Script Explained:
Creating scripts is simple. Simply type /cscript create [script]. If the script already exists, the plugin will notify you. One thing to note is that newly created scripts are EMPTY. They must be filled using /cscript edit. An empty script will not be runnable! The plugin will notify you if a script is empty when trying to run that script.
/cscript save must be run after creating a script in order to save the creation.
Config:
scripts:
example:
- 'command say Hello this is the example script.'
- 'broadcast &aColor Codes are supported! :)'
- 'command say Now waiting 5 seconds until next line.'
- 'timer 100'
- 'command say Script complete. Thanks for using ConsoleScript.'
strings:
noPermission: '&4You do not have permission for that command!'
viewScriptLine: '&a%n. &8%line'
colors:
positive: '&6'
negative: '&c'
accent: '&a'
header: '&9'
dashLine: '&9'
Last Update:
- Updated for latest Spigot build as of 12/3/2015.
- Changed name back to ConsoleScript.
- Corrected version jump.
Next Update:
- This is a past project. Next update will be end-of-life support. I will update the plugin one more time at some point in the future: just to clean up some formatting. That is the last content I will add.

