Skip to content

Commit

Permalink
Updated to Kotlin 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
WillFP committed Dec 5, 2024
1 parent fa6753c commit 1e2d87c
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 13 deletions.
14 changes: 8 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

buildscript {
repositories {
mavenCentral()
}

dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.21")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:2.1.0")
}
}

Expand All @@ -13,7 +15,7 @@ plugins {
id("com.gradleup.shadow") version "8.3.5"
id("maven-publish")
id("java")
kotlin("jvm") version "1.9.21"
kotlin("jvm") version "2.1.0"
}

dependencies {
Expand Down Expand Up @@ -108,12 +110,12 @@ allprojects {

dependencies {
// Kotlin
implementation(kotlin("stdlib", version = "1.9.21"))
implementation(kotlin("stdlib", version = "2.1.0"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")

// Included in spigot jar, no need to move to implementation
compileOnly("org.jetbrains:annotations:23.0.0")
compileOnly("com.google.guava:guava:31.1-jre")
compileOnly("com.google.guava:guava:32.0.0-jre")

// Test
testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.2")
Expand Down Expand Up @@ -157,8 +159,8 @@ allprojects {
}

compileKotlin {
kotlinOptions {
jvmTarget = "17"
compilerOptions {
jvmTarget.set(JvmTarget.JVM_17)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,11 @@ class EcoEventManager(private val plugin: EcoPlugin) : EventManager {
}

override fun registerPacketListener(listener: PacketListener) {
listeners[listener.priority] += RegisteredPacketListener(
plugin,
listener
listeners[listener.priority].add(
RegisteredPacketListener(
plugin,
listener
)
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class EcoSlotBuilder(private val provider: SlotProvider) : SlotBuilder {
private var notCaptiveFor: (Player) -> Boolean = { _ -> false}

override fun onClick(type: ClickType, action: SlotHandler): SlotBuilder {
handlers[type] += action
handlers[type].add(action)
return this
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import net.minecraft.world.entity.monster.RangedAttackMob

object RangedBowAttackGoalFactory : EntityGoalFactory<EntityGoalRangedBowAttack> {
override fun create(apiGoal: EntityGoalRangedBowAttack, entity: PathfinderMob): Goal? {
(if (entity !is Monster) return null)
if (entity !is Monster) return null
if (entity !is RangedAttackMob) return null

return RangedBowAttackGoal(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import net.minecraft.world.entity.monster.RangedAttackMob

object RangedCrossbowAttackGoalFactory : EntityGoalFactory<EntityGoalRangedCrossbowAttack> {
override fun create(apiGoal: EntityGoalRangedCrossbowAttack, entity: PathfinderMob): Goal? {
(if (entity !is Monster) return null)
if (entity !is Monster) return null
if (entity !is RangedAttackMob) return null
if (entity !is CrossbowAttackMob) return null

Expand Down
1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
version = 6.74.4
kotlin.incremental.useClasspathSnapshot=false
Binary file added lib/FabledSkyblock-3.3.0.jar
Binary file not shown.
Binary file removed lib/FabledSkyblock-3.jar
Binary file not shown.
Binary file removed lib/fabledskyblock3.jar
Binary file not shown.
Binary file removed lib/oraxen-1.164.1.jar
Binary file not shown.
Binary file added lib/oraxen-1.185.0.jar
Binary file not shown.

0 comments on commit 1e2d87c

Please sign in to comment.