Skript is a plugin that allows you to customize Minecraft's mechanics with simple scripts written in plain English sentences. You can easily create complex custom commands, triggers that execute effects under certain conditions, and scripts that just run periodically - all without having to know even the slightest bit about programming! The (hopefully) intuitive language has the advantage that you don't even need to learn much to be able to use Skript.

To get an idea of what is possible with Skript consider taking a look at the scripts forum where users of this plugin share the scripts they have written themselves, improving their servers without the need for a plugin developer. Skript can also be used to replace smaller plugins, allowing you to shorten your likely long plugin list. An incomplete list of replaceable plugins can be found on the replacers forum.

Notice

I'm back from my hiatus, but I will likely not be able to update Skript until I can download a recent build of CraftBukkit to fix new bugs. Also, with the future of Bukkit uncertain and no official Minecraft API in sight, I don't know how actively I'll update this plugin.

Introduction

To write a script you simply have to write down what you want Skript to do when some conditions are met. This is a simple 'event → condition(s) → effect(s)' syntax, which could look like the following example:

# This example informs the player when he mines stoneon mine of stone:send "You just mined stone!" to player

Each script can contain many so-called triggers which each start with an event and have a list of as many conditions and effects as you want. The event determines when the conditions are checked, and if all are met, the effects are executed in order. Take a look at the following example which has everything:

# A simple lightning strike/smite/Thor's hammer script:# the trigger has an event:on leftclick with a golden axe:# a condition:player has the permission "thor"# and some effects:strike lightning at the targeted blockbroadcast "Fear the mighty Thor!"

Custom commands can be defined similarly, e.g. the following defines a powerful '/item' command that can be used like '/item 5 diamond swords of sharpness 5 and a cake':

Furthermore Skript also features more complex script elements like loops and conditional statements, which are described in the documentation. Skript also supports variables that can persistently store information globally, per player, per block, etc., and has a wide range of expressions that you can use in conditions, effects, messages and variable names.

A notable feature of Skript are aliases, which are names for Minecraft's items and blocks. Each alias can consist of multiple IDs and data values and allow you to use any item's or block's name in scripts instead of having to use their IDs like many plugins force you to. Along with the ability to define enchanted items you can create some of the possibly most powerful '/item' commands for Bukkit with just a few lines! (two example commands are included in the download)

Need help?

You can always ask for help on the forums, though it can be faster for you and easier for me if you first look through the available tutorials and examples. If you get many "indentation error"s or "invalid line" errors you should read this explanation to understand what indentation is all about.

Tutorials

If you're new to Skript you should read the basic tutorial. It explains how to write a new script step by step. In the likely case that the basic tutorial was too short you can read the more exhaustive tutorial by DemonPenguin. There are also some more official tutorials as well as user-created ones on the tutorials forum.

MostFunGuy: Expert in Skript and Skript accessories. The glue that holds everyone together

Features

Natural syntax

As you might already have noticed writing scripts is not very difficult. You can write (almost) normal english sentences and Skript will try to interpret them. If Skript doesn't understand something, please check your spelling and/or refer to the documentation to find out how to write your sentence to make Skript understand it.

Custom Commands

Skript can be used to define custom commands. These commands can use Skript's syntax which allows to make very user-friendly commands, like one of the most powerful /item commands available, and any other command you or others come up with. Skript also has a setting to try to interpret all unknown commands as effects. This basically allows to use any effects you can put into triggers as a command.

A short introdution on how to create custom commands can be found on my website.

Please note that Skript is not well suited for creating aliases of other plugins' commands or for creating a command that executes multiple other commands. I suggest to use Commander or some other plugin for this purpose.

Inventory Menus

Using SkQuery (An addon for Skript), you can create dynamic inventory menus found in many popular plugins. Want a couple items to display that will do different things such as warps and console commands? This becomes an easy task. Slots can be formatted to do nothing, run a console command and close the menu, or even run a console command and keep the menu open (Usefull for dynamic updating menus that change based on selections)

Chat Formatting/Json Capability

Again, using SkQuery (An addon for Skript), you can completely customize how your chat looks from prefix to suffix to player's name to the actual message itself.

In addition, you can add JSON formatting to your chat in game... Want to highlight a player's name and display a location? A rank? A specific class they have selected? Want to click someones name and have kick/ban/mute/message inventory menu to appear? Easy!

Independent Scripts

Triggers can be put into multiple files, and each file is treated independently. This means that you can easily use triggers made by other people by simply copy&pasting their files into the scripts directory. Scripts are thus like small plugins for Skript with the advantage of being able to edit them easily.

You can find some scripts on the forums, and you can also post your own. Please read the Guidelines before posting a file.

Item and Block Aliases

Aliases help to make the config more user-friendly by using comprehensive names for items and blocks, e.g. you can write 'bonemeal' instead of '351:15', or 'any hoe' instead of listing all hoe types. Aliases support data value ranges and can even consist of multiple types. You can easily define your own aliases, e.g. 'blacklisted = TNT, bedrock, obsidian, monster spawner, lava, lava bucket' and there are also many useful predefined aliases in the main config.

Error Handling

Skript automatically logs errors in the scripts to the console, e.g. if it can't understand a line of a trigger. It will not cease operation, but simply skip the invalid parts of the scripts, be it a whole trigger (e.g. if the event is invalid) or just a single condition (e.g. if there's a typo in the condition's name). This might lead to unexpected behaviour, so always check for errors in the console after you have changed something.

If you use the '/skript reload' command all errors will be sent to the player who used the command (or printed to the console if the command was used from there).

Automatic Update

Skript can detect new versions and update itself, either by a command (/skript update) or automatically when the server starts. You can turn the automatic check on or off, configure whether to check for updates only, and choose whether to download them as well in the config file. If a new version is found, all players with the permission 'skript.admin' will get notified of the new version.

As Simple or as Complicated as You Want To Go

Want to create a message that displays after the player logs in? Sure, easy, 2 lines, done in a flash. Want to create a completely custom, unique experience that will WOW your users and astound them? Sure, it's more complex, but it's all worth it to see your users blown away by the customizability of your creations.

See a user complain that something doesn't work right? Fix the code, reload the skript (Without restarting the server) and watch them be so confused as to how it was already fixed.

Extensible

Java developers can add their own conditions, effects and variables using a provided API.

Many users have completed addons, and these addons contribute IMMENSE amounts of conditions, expressions and triggers. Some give you access to items in item frames, some let you create scoreboards, and some even let you send resource packs to players.

Permissions

Skript works without permissions plugins, but It also provides some permission in case you use one:

skript.admin

Grants access to the /skript command.

skript.effectcommands

Allows to use effects as commands if effect commands are enabled in the config.

You can also use the '<player> has/doesn't have the permission "permission.here"' condition in scripts to check whether a player has/doesn't have a certain permission. You can even create your own permissions this way, but you should note that "mypermissions.*" does not give all permission that start with "mypermissions." (The exception to this rule are other plugins' "*" permissions and any permissions starting with "skript.").

Download

To install or update Skript, download the latest Skript.jar and save it in your server's plugin directory. If you're installing Skript for the first time, start & stop your server once to generate the config files and some example scripts.

Please read the changelog when updating, and create a backup of your database(s) just to play it safe.

Donations

Changelog

v2.1.1 (11 March 2014)

Please still create a backup of the old variables table just to play it safe.

Part of the fix required to save and load all variables on the main server thread, i.e. performance may suffer.

Improvements

Changed the updater to adhere to the new Bukkit guidelines

Improved the automatic config updating

Should be compatible with Java 6 again

Decreased chances of errors due to improved automatic code analysis

Added a workaround to be able to remove a player's tool in a click event

Added workaround to make Skript more compatible with mods that dynamically change enums via reflection. If they do this improperly Skript will still not be compatible with them however.

Added some 1.7 block to the code

Improved/fixed visual effects

Improved expression lists

Added an error on an unsuccessful hook into another plugin

Improved regions support

Added expression 'me' that can only be used in effect commands

Improved documentation generation

Improved effect commands

Added 'luck' and 'lure' enchantments now that Bukkit supports them

Fixes

Fixed configs only working with tabs. You can now use any indentation again, and even use different types in one file.

Fixed some other minor config related issues

Fixed error reporting not reporting the whole error

Fixed the pressure plate event to also fire for golden and iron pressure plates

Fixed a few issues with custom language files

Fixed "neither ... nor ..." not working as expected

Fixed some log-related errors and fixed some log messages that didn't appear at all

Fixed not complaining about storing an entity or other non-serialisable data in list variables

Fixed the Bukkit command registration hack to work in 1.7.2 R0.4 as well

Fixed effect command to use english

Code Related

Slightly improved directions

Minor performance improvements

Added draft for sound support

Removed script caching completely, as it never worked anyway. This might break addons.

Added some more comments to the API

2.1 (17 December 2013)

Note

this release includes two changes to how variables are saved, thus please test saving and loading variables on a test server before updating Skript on your main server (especially if you're using a database - but make sure to configure the test server to access a different database!)

added support for multiple databases (this also allows to define variables that won't be saved at all)

Comments

Please don't use the comments to ask questions, report a bug or issue, or suggest a new feature, as comments can get extremely unorganized very quickly. Use the help forum instead if you have a question, the suggestions forum for feature requests, or create a ticket to submit a bug report.

Comments

on break of quartz ore:
if player has permission "mineur":
if player is holding diamond pickaxe or golden pickaxe or iron pickaxe or wooden pickaxe or stone pickaxe:
add 1 to {xp.%player%}
add 1 to {money.%player%}
add 1 to {quartz.%player%}

When I break this block normally it adds +1 to the but instead it adds +2.

★ ★ ★ ★ ★ ★ ★ ★

Hello, Skript is abandoned by its owner and currently being maintained by bensku. Please don't use this (bukkit) version and don't send issues here.The most recent fork: https://github.com/SkriptLang/Skript