/sf4k

A library for using Kotlin to write Slimefun addons

Primary LanguageKotlinApache License 2.0Apache-2.0

sf4k

Maven Central Version Docs

sf4k is a library for Kotlin that provides a useful base and utilities for writing Slimefun addons.

Installation

Gradle

repositories {
    mavenCentral()
}

dependencies {
    implementation("io.github.seggan:sf4k:[VERSION]")
}

Maven

<dependency>
    <groupId>io.github.seggan</groupId>
    <artifactId>sf4k</artifactId>
    <version>[VERSION]</version>
</dependency>

How to use

sf4k provides AbstractAddon as a base class for you to extend from, as Kotlin does not allow you to extend both JavaPlugin and SlimefunAddon at the same time.

sf4k also provides a few convenience functions, such as destructuring and operator overloads for Location, and BlockStorage serialization interface. See the docs for more information.