diff --git a/build.gradle.kts b/build.gradle.kts index 7db7ae98a..ff434cedb 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,7 +4,7 @@ buildscript { } dependencies { - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.21") } } @@ -13,7 +13,7 @@ plugins { id("com.github.johnrengelman.shadow") version "8.1.1" id("maven-publish") id("java") - kotlin("jvm") version "1.7.10" + kotlin("jvm") version "1.9.21" } dependencies { @@ -92,16 +92,16 @@ allprojects { dependencies { // Kotlin - implementation(kotlin("stdlib", version = "1.7.10")) - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.2") + implementation(kotlin("stdlib", version = "1.9.21")) + 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") // Test - testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.2") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.2") + testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.2") + testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.2") // Adventure implementation("net.kyori:adventure-api:4.10.1") @@ -111,8 +111,8 @@ allprojects { implementation("net.kyori:adventure-text-serializer-legacy:4.10.1") // Other - implementation("com.github.ben-manes.caffeine:caffeine:3.1.0") - implementation("org.apache.maven:maven-artifact:3.8.5") + implementation("com.github.ben-manes.caffeine:caffeine:3.1.5") + implementation("org.apache.maven:maven-artifact:3.9.0") } tasks.withType { diff --git a/eco-api/build.gradle.kts b/eco-api/build.gradle.kts index 5c345ba9b..4d7b406c6 100644 --- a/eco-api/build.gradle.kts +++ b/eco-api/build.gradle.kts @@ -4,6 +4,7 @@ dependencies { // Other compileOnly("org.spigotmc:spigot-api:1.20.2-R0.1-SNAPSHOT") + compileOnly("commons-lang:commons-lang:2.6") compileOnly("com.comphenix.protocol:ProtocolLib:4.6.1-SNAPSHOT") compileOnly("com.google.code.gson:gson:2.8.8") } diff --git a/eco-api/src/main/java/com/willfp/eco/core/gui/slot/SlotBuilder.java b/eco-api/src/main/java/com/willfp/eco/core/gui/slot/SlotBuilder.java index fef7cc10a..0e34dd857 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/gui/slot/SlotBuilder.java +++ b/eco-api/src/main/java/com/willfp/eco/core/gui/slot/SlotBuilder.java @@ -196,6 +196,7 @@ default SlotBuilder setCaptive() { * @deprecated Use {@link SlotBuilder#setUpdater(SlotUpdater)} instead. */ @Deprecated + @SuppressWarnings("DeprecatedIsStillUsed") default SlotBuilder setModifier(@NotNull SlotModifier modifier) { return setUpdater((player, menu, previous) -> { modifier.modify(player, menu, previous); diff --git a/eco-api/src/main/java/com/willfp/eco/core/integrations/placeholder/PlaceholderManager.java b/eco-api/src/main/java/com/willfp/eco/core/integrations/placeholder/PlaceholderManager.java index 4266e8e52..51ba6fe72 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/integrations/placeholder/PlaceholderManager.java +++ b/eco-api/src/main/java/com/willfp/eco/core/integrations/placeholder/PlaceholderManager.java @@ -150,6 +150,7 @@ public static String getResult(@Nullable final EcoPlugin plugin, */ @Deprecated(since = "6.56.0", forRemoval = true) @NotNull + @SuppressWarnings("DeprecatedIsStillUsed") public static String translatePlaceholders(@NotNull final String text, @Nullable final Player player) { return translatePlaceholders(text, player, EMPTY_INJECTABLE); @@ -166,6 +167,7 @@ public static String translatePlaceholders(@NotNull final String text, */ @Deprecated(since = "6.56.0", forRemoval = true) @NotNull + @SuppressWarnings("DeprecatedIsStillUsed") public static String translatePlaceholders(@NotNull final String text, @Nullable final Player player, @NotNull final PlaceholderInjectable context) { @@ -192,6 +194,7 @@ public static String translatePlaceholders(@NotNull final String text, */ @Deprecated(since = "6.56.0", forRemoval = true) @NotNull + @SuppressWarnings("DeprecatedIsStillUsed") public static String translatePlaceholders(@NotNull final String text, @Nullable final Player player, @NotNull final PlaceholderInjectable context, diff --git a/eco-api/src/main/java/com/willfp/eco/core/web/UpdateChecker.java b/eco-api/src/main/java/com/willfp/eco/core/web/UpdateChecker.java index 3aeedc32f..edb155c03 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/web/UpdateChecker.java +++ b/eco-api/src/main/java/com/willfp/eco/core/web/UpdateChecker.java @@ -1,13 +1,13 @@ package com.willfp.eco.core.web; import com.willfp.eco.core.EcoPlugin; -import org.bukkit.util.Consumer; import org.jetbrains.annotations.NotNull; import java.io.IOException; import java.io.InputStream; import java.net.URL; import java.util.Scanner; +import java.util.function.Consumer; /** * Class to check for updates of a plugin on spigot. diff --git a/eco-api/src/main/java/com/willfp/eco/util/PotionUtils.java b/eco-api/src/main/java/com/willfp/eco/util/PotionUtils.java index 341b2d950..53da6a068 100644 --- a/eco-api/src/main/java/com/willfp/eco/util/PotionUtils.java +++ b/eco-api/src/main/java/com/willfp/eco/util/PotionUtils.java @@ -13,6 +13,7 @@ public final class PotionUtils { * @param data The data. * @return The duration. */ + @SuppressWarnings("deprecation") public static int getDuration(@NotNull final PotionData data) { if (data.isExtended()) { return switch (data.getType()) { diff --git a/eco-api/src/main/kotlin/com/willfp/eco/util/PotionUtils.kt b/eco-api/src/main/kotlin/com/willfp/eco/util/PotionUtils.kt index 7a7260228..e5daef538 100644 --- a/eco-api/src/main/kotlin/com/willfp/eco/util/PotionUtils.kt +++ b/eco-api/src/main/kotlin/com/willfp/eco/util/PotionUtils.kt @@ -2,8 +2,8 @@ package com.willfp.eco.util -import org.bukkit.potion.PotionData -/** @see PotionData.duration */ -val PotionData.duration: Int +/** @see PotionUtils.getDuration */ +@Suppress("DEPRECATION") +val org.bukkit.potion.PotionData.duration: Int get() = PotionUtils.getDuration(this) diff --git a/eco-core/core-nms/v1_20_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_20_R1/DisplayName.kt b/eco-core/core-nms/v1_20_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_20_R1/DisplayName.kt index aed8a7407..b0d1a879b 100644 --- a/eco-core/core-nms/v1_20_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_20_R1/DisplayName.kt +++ b/eco-core/core-nms/v1_20_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_20_R1/DisplayName.kt @@ -30,7 +30,12 @@ class DisplayName : DisplayNameProxy { .apply { isAccessible = true } .get(null) as EntityDataAccessor - override fun setClientsideDisplayName(entity: LivingEntity, player: Player, displayName: Component, visible: Boolean) { + override fun setClientsideDisplayName( + entity: LivingEntity, + player: Player, + displayName: Component, + visible: Boolean + ) { if (entity !is CraftLivingEntity) { return } @@ -53,7 +58,7 @@ class DisplayName : DisplayNameProxy { player.sendPacket(Packet(packet)) } - private fun SynchedEntityData.forceSet( + private fun SynchedEntityData.forceSet( accessor: EntityDataAccessor, value: T ) { diff --git a/eco-core/core-nms/v1_20_R2/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_20_R2/DisplayName.kt b/eco-core/core-nms/v1_20_R2/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_20_R2/DisplayName.kt index 121feb526..eed999b6f 100644 --- a/eco-core/core-nms/v1_20_R2/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_20_R2/DisplayName.kt +++ b/eco-core/core-nms/v1_20_R2/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_20_R2/DisplayName.kt @@ -55,7 +55,7 @@ class DisplayName : DisplayNameProxy { player.sendPacket(Packet(packet)) } - private fun SynchedEntityData.forceSet( + private fun SynchedEntityData.forceSet( accessor: EntityDataAccessor, value: T ) { diff --git a/eco-core/core-plugin/build.gradle.kts b/eco-core/core-plugin/build.gradle.kts index 0111e786a..90cacf2be 100644 --- a/eco-core/core-plugin/build.gradle.kts +++ b/eco-core/core-plugin/build.gradle.kts @@ -74,6 +74,7 @@ tasks { minimize { exclude(dependency("org.litote.kmongo:kmongo-coroutine:.*")) exclude(dependency("org.jetbrains.exposed:.*:.*")) + exclude(dependency("com.willfp:ModelEngineBridge:.*")) } } diff --git a/eco-core/core-plugin/src/main/kotlin/com/mongodb/diagnostics/logging/Loggers.kt b/eco-core/core-plugin/src/main/kotlin/com/mongodb/internal/diagnostics/logging/Loggers.kt similarity index 93% rename from eco-core/core-plugin/src/main/kotlin/com/mongodb/diagnostics/logging/Loggers.kt rename to eco-core/core-plugin/src/main/kotlin/com/mongodb/internal/diagnostics/logging/Loggers.kt index 8ff03fd98..9e3f88b70 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/mongodb/diagnostics/logging/Loggers.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/mongodb/internal/diagnostics/logging/Loggers.kt @@ -1,4 +1,4 @@ -package com.mongodb.diagnostics.logging +package com.mongodb.internal.diagnostics.logging /* This is a terrible fix for mongo logging. diff --git a/gradle.properties b/gradle.properties index 70b2f704f..7b2827538 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,2 @@ version = 6.67.0 -plugin-name = eco -kotlin.code.style = official \ No newline at end of file +kotlin.incremental.useClasspathSnapshot=false \ No newline at end of file diff --git a/lib/fabledskyblock3.jar b/lib/FabledSkyblock-3.jar similarity index 81% rename from lib/fabledskyblock3.jar rename to lib/FabledSkyblock-3.jar index 211c555f4..56d57f908 100644 Binary files a/lib/fabledskyblock3.jar and b/lib/FabledSkyblock-3.jar differ