From 3c1e5ee19254e8696739dbcec0eda5e175deb54c Mon Sep 17 00:00:00 2001 From: Auxilor Date: Mon, 24 Oct 2022 17:05:27 +0100 Subject: [PATCH] libreforge-updater --- build.gradle.kts | 4 +-- .../com/willfp/ecobosses/EcoBossesPlugin.kt | 4 --- .../com/willfp/ecobosses/bosses/EcoBoss.kt | 14 +++++----- .../willfp/ecobosses/events/BossDeathEvent.kt | 2 -- .../ecobosses/events/BossDespawnEvent.kt | 1 - .../willfp/ecobosses/events/BossKillEvent.kt | 1 - .../ecobosses/lifecycle/LifecycleHandlers.kt | 1 - .../ecobosses/spawn/AutospawnHandler.kt | 2 +- .../com/willfp/ecobosses/tick/ChunkTicker.kt | 2 +- .../willfp/ecobosses/util/LocalCommands.kt | 3 +-- .../core-plugin/src/main/resources/config.yml | 9 ++++++- .../core-plugin/src/main/resources/lang.yml | 26 ++++++++++--------- gradle.properties | 4 +-- 13 files changed, 37 insertions(+), 36 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 8d1e04b..5e27baa 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -37,11 +37,11 @@ allprojects { } dependencies { - compileOnly("com.willfp:eco:6.35.1") + compileOnly("com.willfp:eco:6.44.0") compileOnly("org.jetbrains:annotations:23.0.0") compileOnly("org.jetbrains.kotlin:kotlin-stdlib:1.7.10") - implementation("com.willfp:libreforge:3.114.1") + implementation("com.willfp:libreforge:3.115.0") implementation("org.joml:joml:1.10.4") } diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/EcoBossesPlugin.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/EcoBossesPlugin.kt index 413d106..915617c 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/EcoBossesPlugin.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/EcoBossesPlugin.kt @@ -79,10 +79,6 @@ class EcoBossesPlugin : LibReforgePlugin() { ) } - override fun getMinimumEcoVersion(): String { - return "6.35.1" - } - companion object { @JvmStatic lateinit var instance: EcoBossesPlugin diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/bosses/EcoBoss.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/bosses/EcoBoss.kt index 93fbd52..92d5675 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/bosses/EcoBoss.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/bosses/EcoBoss.kt @@ -305,13 +305,15 @@ class EcoBoss( private val currentlyAlive = mutableMapOf() - override val conditions = config.getSubsections("conditions").mapNotNull { - Conditions.compile(it, "Boss ID $id") - }.toSet() + override val conditions = Conditions.compile( + config.getSubsections("conditions"), + "Boss ID $id" + ) - override val effects = config.getSubsections("effects").mapNotNull { - Effects.compile(it, "Boss ID $id") - }.toSet() + override val effects = Effects.compile( + config.getSubsections("effects"), + "Boss ID $id" + ) fun markDead(uuid: UUID) { currentlyAlive.remove(uuid) diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/events/BossDeathEvent.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/events/BossDeathEvent.kt index c696eda..e69bfa5 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/events/BossDeathEvent.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/events/BossDeathEvent.kt @@ -1,10 +1,8 @@ package com.willfp.ecobosses.events import com.willfp.ecobosses.bosses.LivingEcoBoss -import com.willfp.ecobosses.lifecycle.BossLifecycle import org.bukkit.event.Event import org.bukkit.event.HandlerList -import org.bukkit.event.entity.EntityDeathEvent abstract class BossDeathEvent( val boss: LivingEcoBoss diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/events/BossDespawnEvent.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/events/BossDespawnEvent.kt index f955d0e..95a47bd 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/events/BossDespawnEvent.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/events/BossDespawnEvent.kt @@ -1,7 +1,6 @@ package com.willfp.ecobosses.events import com.willfp.ecobosses.bosses.LivingEcoBoss -import com.willfp.ecobosses.lifecycle.BossLifecycle import org.bukkit.event.HandlerList class BossDespawnEvent( diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/events/BossKillEvent.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/events/BossKillEvent.kt index 441943a..392f0c6 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/events/BossKillEvent.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/events/BossKillEvent.kt @@ -1,7 +1,6 @@ package com.willfp.ecobosses.events import com.willfp.ecobosses.bosses.LivingEcoBoss -import com.willfp.ecobosses.lifecycle.BossLifecycle import org.bukkit.entity.Player import org.bukkit.event.HandlerList import org.bukkit.event.entity.EntityDeathEvent diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/lifecycle/LifecycleHandlers.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/lifecycle/LifecycleHandlers.kt index 61315d6..bce6edb 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/lifecycle/LifecycleHandlers.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/lifecycle/LifecycleHandlers.kt @@ -1,7 +1,6 @@ package com.willfp.ecobosses.lifecycle import com.willfp.ecobosses.bosses.Bosses -import com.willfp.ecobosses.events.BossDeathEvent import com.willfp.ecobosses.events.BossDespawnEvent import com.willfp.ecobosses.events.BossKillEvent import com.willfp.ecobosses.events.BossSpawnEvent diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/spawn/AutospawnHandler.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/spawn/AutospawnHandler.kt index c8fda22..62c3c76 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/spawn/AutospawnHandler.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/spawn/AutospawnHandler.kt @@ -23,7 +23,7 @@ object AutospawnHandler { val world = location.world ?: continue if (plugin.configYml.getBool("autospawn.one-boss-per-world")) { - if (Bosses.getAllAlive().mapNotNull { it.entity }.any { it.world == world }) { + if (Bosses.getAllAlive().map { it.entity }.any { it.world == world }) { continue } } diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/tick/ChunkTicker.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/tick/ChunkTicker.kt index d27df52..99455c6 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/tick/ChunkTicker.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/tick/ChunkTicker.kt @@ -11,7 +11,7 @@ class ChunkTicker : BossTicker { } if (currentChunk.isLoaded && currentChunk.isForceLoaded) { - return; + return } currentChunk.load() diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/util/LocalCommands.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/util/LocalCommands.kt index 791a1b8..0c5431f 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/util/LocalCommands.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/util/LocalCommands.kt @@ -1,6 +1,5 @@ package com.willfp.ecobosses.util -import com.willfp.eco.core.config.interfaces.Config import com.willfp.eco.util.NumberUtils import com.willfp.eco.util.savedDisplayName import com.willfp.ecobosses.EcoBossesPlugin @@ -32,7 +31,7 @@ data class LocalCommands( } for (s in toDispatch) { - Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), s); + Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), s) } } } diff --git a/eco-core/core-plugin/src/main/resources/config.yml b/eco-core/core-plugin/src/main/resources/config.yml index 326b237..dea8d1a 100644 --- a/eco-core/core-plugin/src/main/resources/config.yml +++ b/eco-core/core-plugin/src/main/resources/config.yml @@ -30,7 +30,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 (e.g. 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 0578455..c497083 100644 --- a/eco-core/core-plugin/src/main/resources/lang.yml +++ b/eco-core/core-plugin/src/main/resources/lang.yml @@ -1,9 +1,22 @@ messages: prefix: "&9&lEcoBosses &f» " no-permission: "&cYou don't have permission to do this!" - invalid-command: "&cUnknown subcommand!" not-player: "&cThis command must be run by a player" + 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" + lrcdb-import-error: "&cError importing config: &f%message%" + lrcdb-import-success: "&fImported &a%name%&f! Reload the plugin to install it" + 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%" + sent-drop: "Check console for the drop!" specify-boss: "&cYou must specify a valid boss!" invalid-location: "&cInvalid location!" @@ -15,16 +28,5 @@ messages: invalid-stone: "&cInvalid boss!" give-success: "Gave &a%boss%&r spawn egg to &a%recipient%" requirements-not-met: "&cYou can't spawn this boss!" - on-cooldown: "&cThis effect is on cooldown! &fTime left: &a%seconds% seconds" - 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-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" - lrcdb-import-error: "&cError importing config: &f%message%" - lrcdb-import-success: "&fImported &a%name%&f! Reload the plugin to install it" - 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%" na: "N/A" \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 3ab970d..f95ba41 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ #libreforge-updater -#Fri Oct 21 19:26:42 BST 2022 -version=8.100.1 +#Mon Oct 24 17:05:27 BST 2022 +version=8.101.0 plugin-name=EcoBosses