Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
Bump Minestom/KStom
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoDog896 committed Jan 8, 2022
1 parent 3040ac1 commit a8e0b99
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
12 changes: 6 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

plugins {
// Apply the Kotlin JVM plugin to add support for Kotlin.
id("org.jetbrains.kotlin.jvm") version "1.5.31"
id("org.jetbrains.kotlin.jvm") version "1.6.0"
// Kotlinx serialization for any data format
kotlin("plugin.serialization") version "1.5.31"
// Shade the plugin
Expand Down Expand Up @@ -38,10 +38,10 @@ dependencies {
compileOnly(kotlin("reflect"))

// Compile Minestom into project
compileOnly("com.github.Minestom:Minestom:fa07d861a6")
compileOnly("com.github.Minestom:Minestom:4ee5cbe424")

// Get KStom
compileOnly("com.github.Project-Cepi:KStom:a32f2aa3b5")
compileOnly("com.github.Project-Cepi:KStom:05b5e1f2a1")

// import kotlinx serialization
compileOnly("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.1")
Expand Down Expand Up @@ -84,13 +84,13 @@ tasks {
}

java {
sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}


val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions.jvmTarget = JavaVersion.VERSION_16.toString()
compileKotlin.kotlinOptions.jvmTarget = JavaVersion.VERSION_17.toString()

compileKotlin.kotlinOptions {
freeCompilerArgs = listOf("-Xinline-classes")
Expand Down
12 changes: 8 additions & 4 deletions src/main/kotlin/world/cepi/npc/NPCEditor.kt
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
package world.cepi.npc

import net.minestom.server.extensions.Extension
import world.cepi.kstom.util.log
import world.cepi.kstom.util.node
import world.cepi.npc.modification.SkinCommand

class NPCEditor : Extension() {

override fun initialize() {
override fun initialize(): LoadStatus {

NPCCommand.register()
SkinCommand.register()

eventNode.addChild(NPC.npcNode)
node.addChild(NPC.npcNode)

logger.info("[NPCEditor] has been enabled!")
log.info("[NPCEditor] has been enabled!")

return LoadStatus.SUCCESS
}

override fun terminate() {

NPCCommand.unregister()
SkinCommand.unregister()

logger.info("[NPCEditor] has been disabled!")
log.info("[NPCEditor] has been disabled!")
}

}

0 comments on commit a8e0b99

Please sign in to comment.