Farkit is the Lua plugin system included with the FarAway server. Plugins run inside the server process and can add commands, react to game events, schedule work, inspect players, and modify the primary world.
Place plugins in the server's plugins/ directory. A plugin may be a single .lua file or a directory containing main.lua. The filename or directory name becomes its plugin name.
plugins/
Welcome.lua
Clock/
main.lua
lib/
shared.lua
command().on() and emit().server and player wrappers to interact with online players.player music API.network API.color.* and color.translate().world API and use region() for area helpers.after() and every().config(), playerData(), and save().Callbacks execute synchronously on the server thread. Keep them short: blocking work and large loops can delay game ticks. Scheduled delays and periods are measured in ticks; at the normal 20 ticks per second, 20 ticks are approximately one second.
Plugins have broad access to the server process, including LuaJ Java interop and file access. This is not a sandbox. Only install plugins you trust, and check permissions before performing privileged actions at a player's request.
The bundled API identifies itself as Farkit 1.6. Lua execution is provided by LuaJ with Lua 5.2 syntax. Music controls require the paired updated Faraway client and server JARs; see Player music API.