From a8e0b99744d08967f9c8153be8a2feed129571c8 Mon Sep 17 00:00:00 2001 From: LeoDog896 Date: Sat, 8 Jan 2022 11:19:33 -0500 Subject: [PATCH] Bump Minestom/KStom --- build.gradle.kts | 12 ++++++------ src/main/kotlin/world/cepi/npc/NPCEditor.kt | 12 ++++++++---- src/main/resources/{ => META-INF}/extension.json | 0 3 files changed, 14 insertions(+), 10 deletions(-) rename src/main/resources/{ => META-INF}/extension.json (100%) diff --git a/build.gradle.kts b/build.gradle.kts index 45b0782..81ccbe9 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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 @@ -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") @@ -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") diff --git a/src/main/kotlin/world/cepi/npc/NPCEditor.kt b/src/main/kotlin/world/cepi/npc/NPCEditor.kt index 953e1d1..05da6ac 100644 --- a/src/main/kotlin/world/cepi/npc/NPCEditor.kt +++ b/src/main/kotlin/world/cepi/npc/NPCEditor.kt @@ -1,18 +1,22 @@ 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() { @@ -20,7 +24,7 @@ class NPCEditor : Extension() { NPCCommand.unregister() SkinCommand.unregister() - logger.info("[NPCEditor] has been disabled!") + log.info("[NPCEditor] has been disabled!") } } \ No newline at end of file diff --git a/src/main/resources/extension.json b/src/main/resources/META-INF/extension.json similarity index 100% rename from src/main/resources/extension.json rename to src/main/resources/META-INF/extension.json