Bungee Setup - aki-ks/sbt-bukkit GitHub Wiki

Enable the BungeePlugin for your module.

enablePlugins(BungeePlugin)

Enter your sbt shell and execute Bungee/packagePlugin. Your plugin, its dependencies and a generated plugin.yml file will be packaged into a ready to use bungeecord plugin jar.

The default export location is target/bungee-server/plugins/<plugin-name>.jar

Configuring Server-Api

Your plugin can be compiled against the Bungeecord-Api or the Bungeecord server (an api implementation).

If you want to compile against the bungeecord server implementation, you must tell SbtBukkit where the jar can be found. This is described in the Preparation section of the Start Bungee Server Page.

// Possible values: BungeeApi or BungeeCord
serverApi := BungeeApi

The Bungeecord api is fetched from the sonatype repository. All available api versions are listed there.

serverVersion := "1.12-SNAPSHOT"

Library dependencies

The scala runtime is packaged into your plugin by default unless you assign autoScalaLibrary := false.

Libraries appended to the pluginLibraryDependencies key are also packaged into your plugin jar.

Libraries in libraryDependencies are only available at compile time.

// This library will be packed into your plugin jar.
pluginLibraryDependencies += "com.lihaoyi" %% "fastparse" % "1.0.0"

// This library will not be included in your plugin jar.
// This might be useful if another another plugin ships it.
libraryDependencies += "org.yaml" % "snakeyaml" % "1.10"

Configuring packaging

// Custom name for the generated plugin jar
Bungee / pluginJarName := "example.jar"

// Custom folder for the generated plugin jar
Bungee / pluginFolder := file("/home/user")

// Package an additional jar file into your final plugin jar
Bungee / dependencyJars += file("/home/user/Desktop/ExampleDependency.jar")

Configuring plugin.yml

The plugin.yml file is generated by sbt-bukkit. It's content is defined in your sbt build file by following keys:

// Name of your plugin.
// Defaults to the module name.
Bungee / pluginName := "ExamplePlugin"

// Version of your plugin.
// Defaults to the module version
Bungee / pluginVersion := "1.0"

// Describe your plugin.
// Defaults to project description
Bungee / pluginDescription := "An example plugin configuration"

// Author of the plugin
Bungee / pluginAuthor := "Aki"

// Names of other plugins required to initialize your plugin
Bungee / pluginDependencies += "WorldEdit"

// Names of plugins that extend the functionality of your plugin
Bungee / pluginSoftDependencies += "Vault"

// Main class of your plugin.
// If you don't assign one, SbtBukkit will detect it for you.
Bungee / pluginMain := "me.aki.bukkit.example.ExamplePlugin"

// Add custom values to your plugin.yml
Bungee / pluginManifest += "myKey" -> "HelloWorld"
Bungee / pluginManifest += "anotherKey" -> Map(
  "someSubkey" -> "random"
)