Mineuniverse
Log in Register
Plugins

Scala Plugin API

An API for writing plugins in Scala.
by _ForgeUser10276215
Download Claim this project
5,178 downloads
0 likes
Updated Jun 30, 2026
0 hypes
Developer Tools

Provides a library for writing server plugins in Scala. The plugins are vastly simpler to write than using the original Bukkit API in Java.

Update - This project now provides two plugins:

  • scala-library-plugin-2.10.0.jar
  • scala-plugin-api_2.10-0.3.0.jar

The first plugin provides Scala 2.10.0, so that plugins that depend on it can have scala on the classpath.

The second is an entire Scala Minecraft Server Plugin API that cleans up the Bukkit API very nicely, and allows for writing clean, declarative, immutable, and fun plugins.

The source for the project can be found here: https://github.com/joshcough/MinecraftPlugins.

Examples

Listener example: LightningArrows

The following example demonstrates how to use listeners in Scala. This plugin strikes an entity (any player or mob) with lightning if that entity is hit with an arrow:

import jcdc.pluginfactory.Listeners._
import org.bukkit.entity.EntityType.ARROW

class LightningArrows extends ListeningFor(OnEntityDamageByEntity { e =>
  if (e.getDamager isAn ARROW) e.world.strikeLightning(e.loc)
})

Commands example: Shock

The following example demonstrates how to write commands in Scala. It has one command called "shock" which takes a player as input, and shocks that player with lightning.

import jcdc.pluginfactory.CommandPlugin

class Shock extends CommandPlugin {
  val command = Command("shock", "shock a player", player){
    case (you, them) => them.shock
  }
}

Other features

  • plugin.yml is automatically generated for you.
  • Advanced cube api for 3D world manipulation
  • Cleaner database connectivity
  • Cleaner logging api

Getting Started

A complete guide to getting started writing Scala plugins can be found here: https://github.com/joshcough/MinecraftPlugins/wiki/Getting%20Started

More examples

Many, many more examples can be found here: https://github.com/joshcough/MinecraftPlugins/tree/master/examples/src/main/scala/jcdc/pluginfactory/examples, including Scala versions of WorldEdit, Multi Player Commands (a plugin that supports many of the same commands as Single Player Commands), Warp, and more.

Scaladoc

The Scaladoc for the project can be found here:

http://joshcough.github.com/MinecraftPlugins/scaladoc

scala-library-plugin-2.10.0.jar
MC CB 1.4.7-R0.1
Release 2013-01-21 Get
scala-plugin-api_2.10-0.3.0.jar
MC CB 1.4.7-R0.1
Release 2013-01-21 Get
scala-library-plugin-2.10.0-RC5.jar
MC CB 1.4.6-R0.3
Release 2013-01-01 Get
scala-plugin-api_2.10-0.2.2.jar
MC CB 1.4.6-R0.3
Release 2013-01-01 Get
scala-plugin-api-2.10.0-RC5-0.2.1.jar
MC CB 1.4.6-R0.1
Release 2012-12-29 Get

You Might Also Like

WorldGuard Custom Flags
WorldGuard Custom Flags
97,851
HoloAPI
Advanced and powerful holographic displays
93,959
Minequery
Minequery
91,099
SQLibrary
SQLibrary aims to streamline driver wrappers in Java for every database engine
85,675
WolfyUtilities
Utils and APIs: Config, Language and Inventory API, Protection Utils: WorldGuard, LWC, PlotSquared
84,728
DisguiseTester
Experiment with disguises!
9,677