diff --git a/build.gradle b/build.gradle index 85e9c34..8993996 100644 --- a/build.gradle +++ b/build.gradle @@ -62,8 +62,8 @@ allprojects { } dependencies { - compileOnly 'com.willfp:eco:6.37.2' - implementation 'com.willfp:libreforge:3.114.1' + compileOnly 'com.willfp:eco:6.44.0' + implementation 'com.willfp:libreforge:3.115.0' implementation 'org.joml:joml:1.10.4' compileOnly 'org.jetbrains:annotations:23.0.0' diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml deleted file mode 100644 index 1e777ee..0000000 --- a/config/checkstyle/checkstyle.xml +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/config/checkstyle/suppression.xml b/config/checkstyle/suppression.xml deleted file mode 100644 index 7e05b6f..0000000 --- a/config/checkstyle/suppression.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/talismans/TalismansPlugin.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/talismans/TalismansPlugin.kt index 39a7cef..aa37b72 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/talismans/TalismansPlugin.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/talismans/TalismansPlugin.kt @@ -30,14 +30,6 @@ class TalismansPlugin : LibReforgePlugin() { override fun handleReloadAdditional() { logger.info("${Talismans.values().size} Talismans Loaded") - /* - Broken with talisman bag rn - CustomItem( - this.namespacedKeyFactory.create("any_talisman"), - { test -> TalismanChecks.getTalismanOnItem(test) != null }, - Talismans.values()[0].itemStack - ).register() - */ } override fun loadPluginCommands(): List { @@ -58,10 +50,6 @@ class TalismansPlugin : LibReforgePlugin() { return TalismanDisplay(this) } - override fun getMinimumEcoVersion(): String { - return "6.36.3" - } - companion object { @JvmStatic lateinit var instance: TalismansPlugin diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/talismans/bag/TalismanBag.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/talismans/bag/TalismanBag.kt index b3e22de..473d31e 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/talismans/bag/TalismanBag.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/talismans/bag/TalismanBag.kt @@ -57,10 +57,12 @@ object TalismanBag { plugin.namespacedKeyFactory.create("talisman_bag"), PersistentDataKeyType.STRING_LIST, emptyList() - ).player() + ) for (rows in 1..6) { menus[rows] = menu(rows) { + title = plugin.configYml.getFormattedString("bag.title") + for (row in 1..rows) { for (column in 1..9) { setSlot(row, column, slot({ player, _ -> @@ -83,8 +85,6 @@ object TalismanBag { } } - setTitle(plugin.configYml.getFormattedString("bag.title")) - onRender { player, menu -> val items = menu.getCaptiveItems(player) .filterNot { EmptyTestableItem().matches(it) } diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/talismans/command/CommandGive.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/talismans/command/CommandGive.kt index c721c58..a0b2c3b 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/talismans/command/CommandGive.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/talismans/command/CommandGive.kt @@ -36,10 +36,10 @@ class CommandGive(plugin: EcoPlugin) : Subcommand(plugin, "give", "talismans.com amount = args[2].toIntOrNull() ?: 1 } - val recieverName = args[0] - val reciever = Bukkit.getPlayer(recieverName) + val receiverName = args[0] + val receiver = Bukkit.getPlayer(receiverName) - if (reciever == null) { + if (receiver == null) { sender.sendMessage(plugin.langYml.getMessage("invalid-player")) return } @@ -54,7 +54,7 @@ class CommandGive(plugin: EcoPlugin) : Subcommand(plugin, "give", "talismans.com var message = plugin.langYml.getMessage("give-success") - message = message.replace("%talisman%", talisman.name).replace("%recipient%", reciever.name) + message = message.replace("%talisman%", talisman.name).replace("%recipient%", receiver.name) sender.sendMessage(message) @@ -62,7 +62,7 @@ class CommandGive(plugin: EcoPlugin) : Subcommand(plugin, "give", "talismans.com itemStack.amount = amount - reciever.inventory.addItem(itemStack) + receiver.inventory.addItem(itemStack) } override fun tabComplete(sender: CommandSender, args: List): List { diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/talismans/command/CommandTalismans.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/talismans/command/CommandTalismans.kt index bd3a6e0..8e58268 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/talismans/command/CommandTalismans.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/talismans/command/CommandTalismans.kt @@ -1,6 +1,5 @@ package com.willfp.talismans.command -import com.willfp.eco.core.EcoPlugin import com.willfp.eco.core.command.impl.PluginCommand import com.willfp.libreforge.LibReforgePlugin import com.willfp.libreforge.lrcdb.CommandExport diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/talismans/talismans/Talisman.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/talismans/talismans/Talisman.kt index a31a152..cb248f5 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/talismans/talismans/Talisman.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/talismans/talismans/Talisman.kt @@ -70,13 +70,15 @@ class Talisman( val lowerLevel: Talisman? get() = Talismans.getByID(config.getString("higherLevelOf")) - override val effects = config.getSubsections("effects").mapNotNull { - Effects.compile(it, "Talisman ID $id") - }.toSet() + override val effects = Effects.compile( + config.getSubsections("effects"), + "Talisman $id" + ) - override val conditions = config.getSubsections("conditions").mapNotNull { - Conditions.compile(it, "Talisman ID $id") - }.toSet() + override val conditions = Conditions.compile( + config.getSubsections("conditions"), + "Talisman $id" + ) init { Talismans.addNewTalisman(this) diff --git a/eco-core/core-plugin/src/main/resources/config.yml b/eco-core/core-plugin/src/main/resources/config.yml index 06dcd46..0abe2c5 100644 --- a/eco-core/core-plugin/src/main/resources/config.yml +++ b/eco-core/core-plugin/src/main/resources/config.yml @@ -39,7 +39,14 @@ cannot-afford-type: sound: "BLOCK_NOTE_BLOCK_PLING" pitch: 0.5 -point-names: # If you have point names that look ugly (eg g_souls) then you can map them to nice names to be shown to players. +cannot-afford-price: + in-actionbar: true + sound: + enabled: true + sound: "BLOCK_NOTE_BLOCK_PLING" + pitch: 0.5 + +point-names: # If you have point names that look ugly (eg souls) then you can map them to nice names to be shown to players. example_point: "Nicely Formatted Point" use-faster-move-trigger: true # Disable if you want move trigger to detect sub-1-block movements diff --git a/eco-core/core-plugin/src/main/resources/lang.yml b/eco-core/core-plugin/src/main/resources/lang.yml index 28411fa..9a15be2 100644 --- a/eco-core/core-plugin/src/main/resources/lang.yml +++ b/eco-core/core-plugin/src/main/resources/lang.yml @@ -2,16 +2,11 @@ messages: prefix: "&6&lTalismans&r &8ยป &r" no-permission: "&cYou don't have permission to do this!" not-player: "&cThis command must be run by a player" - invalid-command: "&cUnknown Subcommand!" - reloaded: "Reloaded! Took %time%ms" - needs-player: "&cYou must specify a player" - invalid-player: "&cInvalid player!" - needs-talisman: "&cYou must specify a talisman" - invalid-talisman: "&cInvalid talisman!" - invalid-level: "&cLevel doesn't exist!" - give-success: "Gave &a%talisman%&r to &a%recipient%" + invalid-command: "&cUnknown subcommand!" + reloaded: "Reloaded!" cannot-afford: "&cYou can't afford to do this! &fCost: &a$$%cost%" cannot-afford-type: "&cYou can't afford to do this! &fCost: &a%cost% %type%" + cannot-afford-price: "&cYou can't afford to do this! &fPrice: %price%" on-cooldown: "&cThis effect is on cooldown! &fTime left: &a%seconds% seconds" cannot-transmit: "&cYou can't transmit here!" must-specify-lrcdb-id: "&cYou must specify the ID of the config to download! Not sure what this means? Go to &alrcdb.auxilor.io" @@ -20,4 +15,11 @@ messages: must-specify-config-name: "&cYou must specify the config name!" invalid-config-name: "&cInvalid config name!" lrcdb-export-error: "&cError exporting config: &f%message%" - lrcdb-export-success: "&fExported &a%name%&f! View it on &alrcdb.auxilor.io&f, or share your config ID: &f%id%" \ No newline at end of file + lrcdb-export-success: "&fExported &a%name%&f! View it on &alrcdb.auxilor.io&f, or share your config ID: &f%id%" + + needs-player: "&cYou must specify a player" + invalid-player: "&cInvalid player!" + needs-talisman: "&cYou must specify a talisman" + invalid-talisman: "&cInvalid talisman!" + invalid-level: "&cLevel doesn't exist!" + give-success: "Gave &a%talisman%&r to &a%recipient%" diff --git a/gradle.properties b/gradle.properties index a79cce9..79e3c1a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ #libreforge-updater -#Fri Oct 21 19:26:28 BST 2022 -version=5.123.1 +#Mon Oct 24 17:05:19 BST 2022 +version=5.124.0 plugin-name=Talismans