Comment on page
Creating Custom Syntax
This tutorial explains the process of creating small custom syntax that link to functions, and making these available to the compiler.
This tutorial is designed for people looking to write custom syntax within Skript itself, not as a full external library.
ByteSkript allows very basic custom syntax (effects, expressions, properties) to be created.
This is done by adding a special
syntaxentry to a function, so that when the syntax is used it will reference your function internally.
We can create a basic effect by specifying the
effect: my [cool] effect
Currently, this effect cannot be used, since the ByteSkript compiler does not know about it. In order to use it we must compile this class and add it to the
java -jar path/to/ByteSkript.jar compile
We can then find the script's output in the
compiled/folder. It will be named
Once we move this file to the
libraries/folder, our new syntax will be available to use as
my [cool] effect.
Every time this effect is used, the compiler will trigger your function directly.