diff --git a/eco-api/build.gradle b/eco-api/build.gradle index 30358831..6cf7e918 100644 --- a/eco-api/build.gradle +++ b/eco-api/build.gradle @@ -15,6 +15,7 @@ dependencies { compileOnly 'org.apache.maven:maven-artifact:3.8.1' compileOnly 'com.comphenix.protocol:ProtocolLib:4.6.1-SNAPSHOT' compileOnly 'com.google.code.gson:gson:2.8.8' + compileOnly 'org.apache.commons:commons-lang3:3.0' } java { diff --git a/eco-api/src/main/java/com/willfp/eco/core/items/args/ColorArgParser.java b/eco-api/src/main/java/com/willfp/eco/core/items/args/ColorArgParser.java index 5c77013c..81e1a082 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/items/args/ColorArgParser.java +++ b/eco-api/src/main/java/com/willfp/eco/core/items/args/ColorArgParser.java @@ -15,7 +15,7 @@ import java.util.function.Predicate; * @deprecated Moved to internals. */ @Deprecated(since = "6.16.0", forRemoval = true) -@ApiStatus.ScheduledForRemoval(inVersion = "6.18.1") +@ApiStatus.ScheduledForRemoval(inVersion = "6.18.2") public class ColorArgParser implements LookupArgParser { /** * Instantiate arg parser. diff --git a/eco-api/src/main/java/com/willfp/eco/core/items/args/CustomModelDataArgParser.java b/eco-api/src/main/java/com/willfp/eco/core/items/args/CustomModelDataArgParser.java index 68dc21d8..615f9169 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/items/args/CustomModelDataArgParser.java +++ b/eco-api/src/main/java/com/willfp/eco/core/items/args/CustomModelDataArgParser.java @@ -15,7 +15,7 @@ import java.util.function.Predicate; * @deprecated Moved to internals. */ @Deprecated(since = "6.16.0", forRemoval = true) -@ApiStatus.ScheduledForRemoval(inVersion = "6.18.1") +@ApiStatus.ScheduledForRemoval(inVersion = "6.18.2") public class CustomModelDataArgParser implements LookupArgParser { /** * Instantiate arg parser. diff --git a/eco-api/src/main/java/com/willfp/eco/core/items/args/EnchantmentArgParser.java b/eco-api/src/main/java/com/willfp/eco/core/items/args/EnchantmentArgParser.java index c8c2c2f7..2d3fb984 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/items/args/EnchantmentArgParser.java +++ b/eco-api/src/main/java/com/willfp/eco/core/items/args/EnchantmentArgParser.java @@ -15,7 +15,7 @@ import java.util.function.Predicate; * @deprecated Moved to internals. */ @Deprecated(since = "6.16.0", forRemoval = true) -@ApiStatus.ScheduledForRemoval(inVersion = "6.18.1") +@ApiStatus.ScheduledForRemoval(inVersion = "6.18.2") public class EnchantmentArgParser implements LookupArgParser { /** * Instantiate arg parser. diff --git a/eco-api/src/main/java/com/willfp/eco/core/items/args/TextureArgParser.java b/eco-api/src/main/java/com/willfp/eco/core/items/args/TextureArgParser.java index b3893d42..552f91fc 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/items/args/TextureArgParser.java +++ b/eco-api/src/main/java/com/willfp/eco/core/items/args/TextureArgParser.java @@ -15,7 +15,7 @@ import java.util.function.Predicate; * @deprecated Moved to internals. */ @Deprecated(since = "6.16.0", forRemoval = true) -@ApiStatus.ScheduledForRemoval(inVersion = "6.18.1") +@ApiStatus.ScheduledForRemoval(inVersion = "6.18.2") public class TextureArgParser implements LookupArgParser { /** * Instantiate arg parser. diff --git a/eco-api/src/main/java/com/willfp/eco/core/recipe/recipes/ShapedCraftingRecipe.java b/eco-api/src/main/java/com/willfp/eco/core/recipe/recipes/ShapedCraftingRecipe.java index 6c289e59..40ba656a 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/recipe/recipes/ShapedCraftingRecipe.java +++ b/eco-api/src/main/java/com/willfp/eco/core/recipe/recipes/ShapedCraftingRecipe.java @@ -111,7 +111,7 @@ public final class ShapedCraftingRecipe extends PluginDependent imple List lore = meta.hasLore() ? meta.getLore() : new ArrayList<>(); assert lore != null; lore.add(""); - String add = Eco.getHandler().getEcoPlugin().getLangYml().getString("multiple-in-craft"); + String add = Eco.getHandler().getEcoPlugin().getLangYml().getFormattedString("multiple-in-craft"); add = add.replace("%amount%", String.valueOf(item.getAmount())); lore.add(add); meta.setLore(lore); diff --git a/eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/entities/EntityArgParserNoAI.kt b/eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/entities/EntityArgParserNoAI.kt index b8999480..cb2eaa17 100644 --- a/eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/entities/EntityArgParserNoAI.kt +++ b/eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/entities/EntityArgParserNoAI.kt @@ -9,7 +9,7 @@ class EntityArgParserNoAI : EntityArgParser { var noAI = false for (arg in args) { - if (arg.equals("unbreakable", true)) { + if (arg.equals("no-ai", true)) { noAI = true } } diff --git a/eco-core/core-nms/v1_18_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_18_R1/fast/NMSFastItemStack.kt b/eco-core/core-nms/v1_18_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_18_R1/fast/NMSFastItemStack.kt index d9285a26..c3a80366 100644 --- a/eco-core/core-nms/v1_18_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_18_R1/fast/NMSFastItemStack.kt +++ b/eco-core/core-nms/v1_18_R1/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/v1_18_R1/fast/NMSFastItemStack.kt @@ -24,9 +24,9 @@ class NMSFastItemStack(itemStack: org.bukkit.inventory.ItemStack) : EcoFastItemS override fun getEnchantmentsOnItem(checkStored: Boolean): Map { val enchantmentNBT = - if (checkStored && handle.item === Items.ENCHANTED_BOOK) EnchantedBookItem.getEnchantments( + if (checkStored && handle.getItem() === Items.ENCHANTED_BOOK) EnchantedBookItem.getEnchantments( handle - ) else handle.enchantmentTags + ) else handle.getEnchantmentTags() val foundEnchantments: MutableMap = HashMap() for (base in enchantmentNBT) { val compound = base as CompoundTag @@ -45,9 +45,9 @@ class NMSFastItemStack(itemStack: org.bukkit.inventory.ItemStack) : EcoFastItemS checkStored: Boolean ): Int { val enchantmentNBT = - if (checkStored && handle.item === Items.ENCHANTED_BOOK) EnchantedBookItem.getEnchantments( + if (checkStored && handle.getItem() === Items.ENCHANTED_BOOK) EnchantedBookItem.getEnchantments( handle - ) else handle.enchantmentTags + ) else handle.getEnchantmentTags() for (base in enchantmentNBT) { val compound = base as CompoundTag val key = compound.getString("id") @@ -152,16 +152,16 @@ class NMSFastItemStack(itemStack: org.bukkit.inventory.ItemStack) : EcoFastItemS private var flagBits: Int get() = - if (handle.hasTag() && handle.tag!!.contains( + if (handle.hasTag() && handle.getTag()!!.contains( "HideFlags", 99 ) - ) handle.tag!!.getInt("HideFlags") else 0 + ) handle.getTag()!!.getInt("HideFlags") else 0 set(value) = - handle.orCreateTag.putInt("HideFlags", value) + handle.getOrCreateTag().putInt("HideFlags", value) override fun getRepairCost(): Int { - return handle.baseRepairCost + return handle.getBaseRepairCost() } override fun setRepairCost(cost: Int) { @@ -177,7 +177,7 @@ class NMSFastItemStack(itemStack: org.bukkit.inventory.ItemStack) : EcoFastItemS } override fun hashCode(): Int { - return handle.tag?.hashCode() ?: (0b00010101 * 31 + Item.getId(handle.getItem())) + return handle.getTag()?.hashCode() ?: (0b00010101 * 31 + Item.getId(handle.getItem())) } private fun apply() { diff --git a/eco-core/core-plugin/build.gradle b/eco-core/core-plugin/build.gradle index 7071667d..e5df2e76 100644 --- a/eco-core/core-plugin/build.gradle +++ b/eco-core/core-plugin/build.gradle @@ -36,7 +36,7 @@ dependencies { compileOnly 'com.zaxxer:HikariCP:5.0.0' compileOnly 'com.gmail.filoghost.holographicdisplays:holographicdisplays-api:2.4.0' compileOnly 'com.github.EssentialsX:Essentials:2.19.0' - compileOnly 'com.bgsoftware:SuperiorSkyblockAPI:latest' + compileOnly 'com.bgsoftware:SuperiorSkyblockAPI:1.8.3' compileOnly 'com.github.MilkBowl:VaultAPI:1.7' compileOnly 'world.bentobox:bentobox:1.17.3-SNAPSHOT' compileOnly 'com.google.guava:guava:31.0.1-jre' diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/EcoSpigotPlugin.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/EcoSpigotPlugin.kt index 120a7f09..c35f3add 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/EcoSpigotPlugin.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/EcoSpigotPlugin.kt @@ -74,7 +74,6 @@ import com.willfp.eco.internal.spigot.integrations.anticheat.AnticheatVulcan import com.willfp.eco.internal.spigot.integrations.antigrief.AntigriefBentoBox import com.willfp.eco.internal.spigot.integrations.antigrief.AntigriefCombatLogXV10 import com.willfp.eco.internal.spigot.integrations.antigrief.AntigriefCombatLogXV11 -import com.willfp.eco.internal.spigot.integrations.antigrief.AntigriefCrashClaim import com.willfp.eco.internal.spigot.integrations.antigrief.AntigriefDeluxeCombat import com.willfp.eco.internal.spigot.integrations.antigrief.AntigriefFactionsUUID import com.willfp.eco.internal.spigot.integrations.antigrief.AntigriefGriefPrevention @@ -217,7 +216,7 @@ abstract class EcoSpigotPlugin : EcoPlugin( IntegrationLoader("Towny") { AntigriefManager.register(AntigriefTowny()) }, IntegrationLoader("Lands") { AntigriefManager.register(AntigriefLands(this)) }, IntegrationLoader("Kingdoms") { AntigriefManager.register(AntigriefKingdoms()) }, - IntegrationLoader("CrashClaim") { AntigriefManager.register(AntigriefCrashClaim()) }, + //IntegrationLoader("CrashClaim") { AntigriefManager.register(AntigriefCrashClaim()) }, IntegrationLoader("CombatLogX") { val pluginManager = Bukkit.getPluginManager() val combatLogXPlugin = pluginManager.getPlugin("CombatLogX") ?: return@IntegrationLoader diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/integrations/customentities/CustomEntitiesMythicMobs.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/integrations/customentities/CustomEntitiesMythicMobs.kt index e61c6ec5..3a99446c 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/integrations/customentities/CustomEntitiesMythicMobs.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/integrations/customentities/CustomEntitiesMythicMobs.kt @@ -2,8 +2,8 @@ package com.willfp.eco.internal.spigot.integrations.customentities import com.willfp.eco.core.entities.CustomEntity import com.willfp.eco.core.integrations.customentities.CustomEntitiesWrapper -import com.willfp.eco.util.NamespacedKeyUtils import io.lumine.xikage.mythicmobs.MythicMobs +import org.bukkit.NamespacedKey class CustomEntitiesMythicMobs : CustomEntitiesWrapper { override fun registerAllEntities() { @@ -11,7 +11,8 @@ class CustomEntitiesMythicMobs : CustomEntitiesWrapper { val api = MythicMobs.inst().apiHelper for (id in mobManager.mobNames) { - val key = NamespacedKeyUtils.create("mythicmobs", id.lowercase()) + val key = NamespacedKey.fromString("mythicmobs:${id.lowercase()}") + key ?: continue CustomEntity( key, { diff --git a/eco-core/core-plugin/src/main/resources/plugin.yml b/eco-core/core-plugin/src/main/resources/plugin.yml index fcb00ca9..a39b59c4 100644 --- a/eco-core/core-plugin/src/main/resources/plugin.yml +++ b/eco-core/core-plugin/src/main/resources/plugin.yml @@ -53,4 +53,5 @@ libraries: - 'org.jetbrains.exposed:exposed-jdbc:0.36.2' - 'mysql:mysql-connector-java:8.0.25' - 'com.google.guava:guava:31.0.1-jre' - - 'com.zaxxer:HikariCP:5.0.0' \ No newline at end of file + - 'com.zaxxer:HikariCP:5.0.0' + - 'org.apache.commons:commons-lang3:3.0' \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 1db9e709..92a1b9c8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ -version = 6.18.0 +version = 6.18.5 plugin-name = eco kotlin.code.style = official \ No newline at end of file