[WIP] Bukkit plugin development SBT plugin 0.0.2

Discussion in 'Bukkit Tools' started by DontCare4Free, Jun 2, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    DontCare4Free

    Since I was developing a new (private) Bukkit plugin I was unable to find any Bukkit plugin plugin for SBT. So I decided to write one.

    Features
    • Automatically generates a basic plugin.yml with no configuration needed (including finding the main plugin class, uses the same trick as "sbt run")
    Installation (do this in your project/plugins.sbt)
    1. Add http://nexus.nullable.se/nexus/content/repositories/releases/to the resolvers
      • Code:
        resolvers += "Nullable releases" at "http://nexus.nullable.se/nexus/content/repositories/releases/"
    2. Add the plugin
      • Code:
        addSbtPlugin("se.nullable.xsbt-bukkit" % "xsbt-bukkit" % "0.0.2")
    Source
    https://github.com/dontcare4free/xsbt-bukkit

    What Bukkit version is used?
    Currently it compiles against 1.2.5-R3.0 by default, but you can change this by setting bukkitVersion.
    How do I add plugin dependencies?
    Add the dependencies to bukkitPluginSoftDependencies or bukkitPluginDependencies.
    How do I add commands?
    Set bukkitPluginCommands. It's a map of (name: String -> metadata: BukkitCommand(aliases: Seq[String])).
    How do I add custom stuff to the manifest?
    Set bukkitPluginManifest (it's a map of (key: String -> value: Any)). An important gotcha is that you have to use scala.collection.JavaConverters to convert collections into their Java equivalent for serialization to work properly.

    I originally wanted to add a command for starting a CB server with the plugin too, but that didn't work since Bukkit's and SBT's jline conflict.
     
Thread Status:
Not open for further replies.

Share This Page