CompuBlock

Abandoned
Ingame Lua interpreter
<p>neat</p>

neat

Description

CompuBlock

Any tech-loving Minecraft modder knows of dan200's famous ComputerCraft, in which you can build computers and program them in Lua. CompuBlock is a similar concept created for unmodded Bukkit servers.

Dependencies

This plugin requires Holographic Displays for displaying output

Usage

There are no commands to go with this plugin, so you can start scripting right away! Scripts are written in one of two ways: Either by writing them in a book and quill, where the script can span multiple lines and pages, or by typing the script directly into a command block. To transfer a script into a command block, simply left-click the block with the book and quill. Only players with the "lua" permission set are able to transfer scripts into command blocks, ensuring that only trusted people can write Lua scripts. The scripts are run when the command block receives power.

As far as using Bukkit features in Lua, most of what you need is created dynamically. By default, the Bukkit class and all its methods are loaded, and its method names remain the same.

For example, here is a simple Lua script to change the type of a block:

world = Bukkit.getWorlds().get(0)
block = world.getBlockAt(0, 64, 0)
rand = Random.nextInt(192)
block.setTypeId(rand)

Additional functions include

print(text) -- Takes any number of arguments and prints them to the display
clear() -- Clears the display
setLinePos(linePos) -- Takes a single integer argument and sets the display's line position at that line
shutdown() -- Clears the display and resets the ComputerBlock

WARNING

This plugin is highly experimental

Since this plugin allows players access to native Bukkit methods ingame, there is a possibility for malicious scripts to be created and run. Methods and classes may be blacklisted in the config file, but always take precautions before allowing someone to run scripts.

The CompuBlock Team

profile avatar
  • 6
    Projects
  • 36.7K
    Downloads

More from ShortCircuit908View all

  • HelpTickets project image

    HelpTickets

    • 2.0K
    • Bukkit Plugins

    Powerful ingame issue tracker and player ticket manager backed by SQLite or MySQL

    • 2.0K
    • November 18, 2017
    • Bukkit Plugins
    • +4
  • Splatoon Ultimate project image

    Splatoon Ultimate

    • 14.7K
    • Bukkit Plugins

    A comprehensive rendition of Nintendo's Splatoon™

    • 14.7K
    • December 4, 2015
    • Bukkit Plugins
  • Short Commands project image

    Short Commands

    • 5.3K
    • Bukkit Plugins

    Dynamically manage server commands

    • 5.3K
    • October 29, 2015
    • Bukkit Plugins
  • ItemCondenser project image

    ItemCondenser

    • 8.3K
    • Bukkit Plugins

    Adds various inventory management tools

    • 8.3K
    • July 14, 2015
    • Bukkit Plugins
  • HelpTickets project image

    HelpTickets

    • 2.0K
    • Bukkit Plugins

    Powerful ingame issue tracker and player ticket manager backed by SQLite or MySQL

    • 2.0K
    • November 18, 2017
    • Bukkit Plugins
    • +4
  • Splatoon Ultimate project image

    Splatoon Ultimate

    • 14.7K
    • Bukkit Plugins

    A comprehensive rendition of Nintendo's Splatoon™

    • 14.7K
    • December 4, 2015
    • Bukkit Plugins
  • Short Commands project image

    Short Commands

    • 5.3K
    • Bukkit Plugins

    Dynamically manage server commands

    • 5.3K
    • October 29, 2015
    • Bukkit Plugins
  • ItemCondenser project image

    ItemCondenser

    • 8.3K
    • Bukkit Plugins

    Adds various inventory management tools

    • 8.3K
    • July 14, 2015
    • Bukkit Plugins