Skip to content

4o4E/EPlugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spigot-kotlin 插件框架

按照功能区分模块, 支持按需引入

若模块没有声明则默认使用SpigotAPI-1.13.2作为依赖(在这之前的版本没有非空注解, 和kotlin相性不佳)

开始使用

  1. git clone https://github.com/4o4E/EPlugin.git
  2. gradlew publishToMavenLocal
val epluginVer = "1.0.5" // 在release中查看最新版本
fun eplugin(module: String, version: String = epluginVer) = "top.e404:eplugin-$module:$version"

repositories {
    mavenLocal()
}

dependencies {
    // eplugin core
    implementation(eplugin("core"))
    // 序列化模块(可选)
    implementation(eplugin("serialization"))
    // papi依赖(可选|papi依赖需要手动导入)
    implementation(eplugin("hook-placeholderapi"))
    // placeholderAPI 手动导入papi依赖
    compileOnly("me.clip:placeholderapi:2.11.1")
}

tasks {
    shadowJar {
        archiveFileName.set("${project.name}-${project.version}.jar")
        // 推荐对kotlin和eplugin进行relocate, 避免不同版本的依赖互相冲突
        relocate("kotlin", "top.e404.eclean.relocate.kotlin")
        relocate("top.e404.eplugin", "top.e404.eclean.relocate.eplugin")
    }
}

使用EPlugin的实际项目

项目结构