Quantcast
Channel: Server Mods from Bukkit.org
Viewing all articles
Browse latest Browse all 2356

MCLuaBukkit

$
0
0

Ever wanted to make a Bukkit plugin, but didn't know how? Want to edit code in-game and test it right away? MCLuaBukkit allows use of the Bukkit API with Lua, a simple, yet powerful, scripting language.

Overview

MCLuaBukkit provides a Lua VM with mappings to the Bukkit API, and a few ways to load code into the VM. It allows developers to create Bukkit plugins in Lua. This means plugins with less mistakes, more security, and smaller size. Here's an example of an MCLuaBukkit plugin:

events.onPlayerChat:add(function() return nil, nil, "§7<§r %1$s §7>§9 %2$s" end)

This plugin changes the format of chat messages said by players. MCLuaBukkit provides 3 ways for server operators to load Lua plugins:

  1. By Files Text files put in MCLuaBukkit's configuration folder will be loaded as Lua plugins.
  2. By Chat The /lua command will run Lua code in-game.
  3. By Book And Quill The /luaload command will run Lua code contained inside a book and quill held by the player who ran the command.

Lua APIs Added

  • Server API
  • Event API
  • Player API
  • World API

Commands

  • /lua <code> Runs specified code.
  • /luaload Runs code from a book and quill in the player's hand.

Permissions

  • mcluabukkit.lua Allows execution of Lua code in-game.

Viewing all articles
Browse latest Browse all 2356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>