#
LuaLink v2
LuaLink is an experimental plugin that provides a basic Lua scripting runtime for Paper-based Minecraft servers. It is designed for small and simple tasks and serves as a much more powerful alternative to Skript and other scripting plugins.
Scripting runtime is based on LuaJava with LuaJIT. For more details on implementation specifics or differences, please refer to their respective documentation.
#
Installation
Before you begin, make sure you have met the following requirements:
- Paper based server running 1.20 or higher, and Java 21.
- Basic understanding of Lua scripting and general programming concepts is beneficial.
Plugin can be downloaded from following sources:
#
Quick Start
After you have installed the plugin, you can start writing your first script.
- Script life-cycle can be managed using
/lualink load
,/lualink unload
and/lualink reload
commands. - Each script is stored in a separate folder inside the
plugins/LuaLink/scripts
directory. - Entry point of the script is a file named
main.lua
.
-- Called after the script has been successfully loaded.
script:onLoad(function()
-- Logging message to the console.
print("Hello, World!")
end)
It's quite simple, isn't it? For this particular case, we can simplify it even further by extracting the logic away from the onLoad
block.
-- Logging message to the console.
print("Hello, World!")
Want to do something more complex? More information on how to write scripts can be found on the Getting Started page.