Sueta
LU

Lua4Bukkit

Alpha 0.1

Provides a simple lua api to create lua plugin for bukkit/spigot.

·Plugin

Description

This plugin provides a lua plugin api, which allows you to write simple plugins in lua to extend your bukkit/spigot server.

Similar working Plugin

My plugin is currently in an early development state. I got a tip on another plugin that seems to do the same as mine. If you need a fully working lua plugin api check out Lukkit.
Link: https://www.spigotmc.org/resources/lukkit.32599/

Requirements

  • Bukkit or Spigot server on version 1.8 or later
  • Java 8

Installation

  1. Download the plugins .jar file and drop it into your servers plugins folder
  2. Reload/restart your server
  3. You're done! Continue writing your first lua plugin!

Writing custom plugins

First of all open plugins/Lua4Bukkit/plugins and create a new directory in there. You can call it whatever you want to name your plugin. (whitespaces might break it)

In this directory create a file called "plugin.lua" which will contain your main plugin code.

Some more examples and a wiki will follow soon on the github repository.

Example code

-- Example command
PluginAPI:registerCommand("hello",function(sender,args)
sender:sendMessage("World!")
end)
-- Example events
PluginAPI:registerEvent("PlayerJoinEvent",function(event)
event:setJoinMessage("§8[§2+§8] §a"..event:getPlayer():getName())
end)

Credits

Library used for lua parsing and execution:
LuaJ 3.0.1 by LuaJ.org

Similar projects

Plugin →