Skript
Skript is an interpreted domain-specific programming language created in Java based on the Bukkit API.[1] It's specifically designed to make so-called skripts which change the behavior of objects in the video game Minecraft with instructions which closely resemble the English language.[1] Skript was created on September 14, 2011 by Peter Güttinger, going by the online name Njol.[2][3]
Language design
The language is designed to be as close to English as possible, but is still considered an official programming language.[1] It uses a file layout similar to that of YAML with some exceptions. The first one is that, unlike YAML, sections can have multiple of the same lines. Second, the files use tabs as indentations, not spaces.
Examples
Dropping glass when broken
As a simple example, the following snippet will drop a piece of glass whenever a block of glass has been broken.
on break of glass:
drop glassMessage on command
The following sends a message to the player stating their current held tool's info when the command "id" has been executed.
command /id:
description: Find the ID of the item you're holding
trigger:
message "You're holding a %type of tool% whose ID is %id of tool%."Automatic refueling furnaces
This program finds fuel in chests surrounding a furnace and will restock the furnace with specified fuel once the furnace has used a piece of fuel.
on burn of fuel:
fuel slot of the block is empty
loop blocks in radius 1:
loop-block is chest
loop items of type fuel:
loop-block contains loop-item
remove loop-item from loop-block
set fuel of the event-block to loop-item
stop triggerComparison with Java
Since Skript is only usable on a Minecraft server, it is often compared to the Java programming language as that's the traditional way to program plugins for it. Mitch Smith from Shockbyte, a platform for hosting Minecraft servers, and Stephanie Hertrich both said that the language is easy to learn.[4][5] Mitch Smith continued praising the language, saying that the language is easier to learn, is more consistent, has improved error handling and does not require the user to recompile the files whenever a change has been made.[4] He also noted that Skript is just as powerful as Java, saying that "Although scripts are confined to code Skript actually supports, it technically has no more limitations than a Java plugin would".[4]
Derivatives and addons
Due to the lack of updates by the original author and the popularity of the language[2], a lot of forks of the original work have been created which aim to provide new functionality, fix bugs in the original version and support for the latest Minecraft. Some notable forks are:
Addons have also been created to provide new instructions to the Skript language, which are supported by the original Skript.[8] Some notable addons are:
See also
References
- ↑ 1.0 1.1 1.2 http://en.njol.ch/projects/skript
- ↑ 2.0 2.1 https://dev.bukkit.org/projects/skript
- ↑ https://github.com/Njol
- ↑ 4.0 4.1 4.2 Smith, Mitch (May 19, 2017). "Create Minecraft plugins without Java". Shockbyte. Retrieved May 8, 2018.
- ↑ Hertrich, Stephanie (February 16, 2016). "Crée ton premier plugin Minecraft avec Skript". Microsoft. Retrieved May 8, 2018.
- ↑ https://github.com/bensku/Skript
- ↑ https://github.com/nfell2009/Skript
- ↑ http://en.njol.ch/projects/skript/API
- ↑ https://docs.skunity.com/addon/WildSkript
- ↑ https://forums.skunity.com/resources/skutilities.26/
- ↑ http://vixio.space/
This article "Skript" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:Skript. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.
