mirror of
https://github.com/Auxilor/EcoMobs.git
synced 2025-12-20 07:29:21 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee32897b1c | ||
|
|
67b38896ca | ||
|
|
39b91bc828 | ||
|
|
e2e7b44a75 | ||
|
|
3c1e5ee192 | ||
|
|
56789f331b |
@@ -37,11 +37,11 @@ allprojects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
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:annotations:23.0.0")
|
||||||
compileOnly("org.jetbrains.kotlin:kotlin-stdlib:1.7.10")
|
compileOnly("org.jetbrains.kotlin:kotlin-stdlib:1.7.10")
|
||||||
|
|
||||||
implementation("com.willfp:libreforge:3.114.0")
|
implementation("com.willfp:libreforge:3.117.0")
|
||||||
implementation("org.joml:joml:1.10.4")
|
implementation("org.joml:joml:1.10.4")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -79,10 +79,6 @@ class EcoBossesPlugin : LibReforgePlugin() {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getMinimumEcoVersion(): String {
|
|
||||||
return "6.35.1"
|
|
||||||
}
|
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
lateinit var instance: EcoBossesPlugin
|
lateinit var instance: EcoBossesPlugin
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import com.google.common.collect.BiMap
|
|||||||
import com.google.common.collect.HashBiMap
|
import com.google.common.collect.HashBiMap
|
||||||
import com.google.common.collect.ImmutableList
|
import com.google.common.collect.ImmutableList
|
||||||
import com.willfp.eco.core.config.ConfigType
|
import com.willfp.eco.core.config.ConfigType
|
||||||
import com.willfp.eco.core.config.TransientConfig
|
import com.willfp.eco.core.config.readConfig
|
||||||
import com.willfp.eco.core.config.updating.ConfigUpdater
|
import com.willfp.eco.core.config.updating.ConfigUpdater
|
||||||
import com.willfp.ecobosses.EcoBossesPlugin
|
import com.willfp.ecobosses.EcoBossesPlugin
|
||||||
import com.willfp.libreforge.separatorAmbivalent
|
import com.willfp.libreforge.separatorAmbivalent
|
||||||
@@ -54,7 +54,7 @@ object Bosses {
|
|||||||
addNewBoss(EcoBoss(id, config, plugin))
|
addNewBoss(EcoBoss(id, config, plugin))
|
||||||
}
|
}
|
||||||
|
|
||||||
val ecoBossesYml = TransientConfig(File(plugin.dataFolder, "ecobosses.yml"), ConfigType.YAML)
|
val ecoBossesYml = File(plugin.dataFolder, "ecobosses.yml").readConfig(ConfigType.YAML)
|
||||||
|
|
||||||
for (bossConfig in ecoBossesYml.getSubsections("bosses")) {
|
for (bossConfig in ecoBossesYml.getSubsections("bosses")) {
|
||||||
// Boss configs are separator ambivalent in order to preserve backwards compatibility
|
// Boss configs are separator ambivalent in order to preserve backwards compatibility
|
||||||
|
|||||||
@@ -305,13 +305,15 @@ class EcoBoss(
|
|||||||
|
|
||||||
private val currentlyAlive = mutableMapOf<UUID, LivingEcoBoss>()
|
private val currentlyAlive = mutableMapOf<UUID, LivingEcoBoss>()
|
||||||
|
|
||||||
override val conditions = config.getSubsections("conditions").mapNotNull {
|
override val conditions = Conditions.compile(
|
||||||
Conditions.compile(it, "Boss ID $id")
|
config.getSubsections("conditions"),
|
||||||
}.toSet()
|
"Boss ID $id"
|
||||||
|
)
|
||||||
|
|
||||||
override val effects = config.getSubsections("effects").mapNotNull {
|
override val effects = Effects.compile(
|
||||||
Effects.compile(it, "Boss ID $id")
|
config.getSubsections("effects"),
|
||||||
}.toSet()
|
"Boss ID $id"
|
||||||
|
)
|
||||||
|
|
||||||
fun markDead(uuid: UUID) {
|
fun markDead(uuid: UUID) {
|
||||||
currentlyAlive.remove(uuid)
|
currentlyAlive.remove(uuid)
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
package com.willfp.ecobosses.events
|
package com.willfp.ecobosses.events
|
||||||
|
|
||||||
import com.willfp.ecobosses.bosses.LivingEcoBoss
|
import com.willfp.ecobosses.bosses.LivingEcoBoss
|
||||||
import com.willfp.ecobosses.lifecycle.BossLifecycle
|
|
||||||
import org.bukkit.event.Event
|
import org.bukkit.event.Event
|
||||||
import org.bukkit.event.HandlerList
|
import org.bukkit.event.HandlerList
|
||||||
import org.bukkit.event.entity.EntityDeathEvent
|
|
||||||
|
|
||||||
abstract class BossDeathEvent(
|
abstract class BossDeathEvent(
|
||||||
val boss: LivingEcoBoss
|
val boss: LivingEcoBoss
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package com.willfp.ecobosses.events
|
package com.willfp.ecobosses.events
|
||||||
|
|
||||||
import com.willfp.ecobosses.bosses.LivingEcoBoss
|
import com.willfp.ecobosses.bosses.LivingEcoBoss
|
||||||
import com.willfp.ecobosses.lifecycle.BossLifecycle
|
|
||||||
import org.bukkit.event.HandlerList
|
import org.bukkit.event.HandlerList
|
||||||
|
|
||||||
class BossDespawnEvent(
|
class BossDespawnEvent(
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package com.willfp.ecobosses.events
|
package com.willfp.ecobosses.events
|
||||||
|
|
||||||
import com.willfp.ecobosses.bosses.LivingEcoBoss
|
import com.willfp.ecobosses.bosses.LivingEcoBoss
|
||||||
import com.willfp.ecobosses.lifecycle.BossLifecycle
|
|
||||||
import org.bukkit.entity.Player
|
import org.bukkit.entity.Player
|
||||||
import org.bukkit.event.HandlerList
|
import org.bukkit.event.HandlerList
|
||||||
import org.bukkit.event.entity.EntityDeathEvent
|
import org.bukkit.event.entity.EntityDeathEvent
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package com.willfp.ecobosses.lifecycle
|
package com.willfp.ecobosses.lifecycle
|
||||||
|
|
||||||
import com.willfp.ecobosses.bosses.Bosses
|
import com.willfp.ecobosses.bosses.Bosses
|
||||||
import com.willfp.ecobosses.events.BossDeathEvent
|
|
||||||
import com.willfp.ecobosses.events.BossDespawnEvent
|
import com.willfp.ecobosses.events.BossDespawnEvent
|
||||||
import com.willfp.ecobosses.events.BossKillEvent
|
import com.willfp.ecobosses.events.BossKillEvent
|
||||||
import com.willfp.ecobosses.events.BossSpawnEvent
|
import com.willfp.ecobosses.events.BossSpawnEvent
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ object AutospawnHandler {
|
|||||||
val world = location.world ?: continue
|
val world = location.world ?: continue
|
||||||
|
|
||||||
if (plugin.configYml.getBool("autospawn.one-boss-per-world")) {
|
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
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class ChunkTicker : BossTicker {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (currentChunk.isLoaded && currentChunk.isForceLoaded) {
|
if (currentChunk.isLoaded && currentChunk.isForceLoaded) {
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
currentChunk.load()
|
currentChunk.load()
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.willfp.ecobosses.util
|
package com.willfp.ecobosses.util
|
||||||
|
|
||||||
import com.willfp.eco.core.config.interfaces.Config
|
|
||||||
import com.willfp.eco.util.NumberUtils
|
import com.willfp.eco.util.NumberUtils
|
||||||
import com.willfp.eco.util.savedDisplayName
|
import com.willfp.eco.util.savedDisplayName
|
||||||
import com.willfp.ecobosses.EcoBossesPlugin
|
import com.willfp.ecobosses.EcoBossesPlugin
|
||||||
@@ -32,7 +31,7 @@ data class LocalCommands(
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (s in toDispatch) {
|
for (s in toDispatch) {
|
||||||
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), s);
|
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), s)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,14 @@ cannot-afford-type:
|
|||||||
sound: "BLOCK_NOTE_BLOCK_PLING"
|
sound: "BLOCK_NOTE_BLOCK_PLING"
|
||||||
pitch: 0.5
|
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"
|
example_point: "Nicely Formatted Point"
|
||||||
|
|
||||||
use-faster-move-trigger: true # Disable if you want move trigger to detect sub-1-block movements
|
use-faster-move-trigger: true # Disable if you want move trigger to detect sub-1-block movements
|
||||||
|
|||||||
@@ -1,9 +1,22 @@
|
|||||||
messages:
|
messages:
|
||||||
prefix: "&9&lEcoBosses &f» "
|
prefix: "&9&lEcoBosses &f» "
|
||||||
no-permission: "&cYou don't have permission to do this!"
|
no-permission: "&cYou don't have permission to do this!"
|
||||||
invalid-command: "&cUnknown subcommand!"
|
|
||||||
not-player: "&cThis command must be run by a player"
|
not-player: "&cThis command must be run by a player"
|
||||||
|
invalid-command: "&cUnknown subcommand!"
|
||||||
reloaded: "Reloaded!"
|
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!"
|
sent-drop: "Check console for the drop!"
|
||||||
specify-boss: "&cYou must specify a valid boss!"
|
specify-boss: "&cYou must specify a valid boss!"
|
||||||
invalid-location: "&cInvalid location!"
|
invalid-location: "&cInvalid location!"
|
||||||
@@ -15,16 +28,5 @@ messages:
|
|||||||
invalid-stone: "&cInvalid boss!"
|
invalid-stone: "&cInvalid boss!"
|
||||||
give-success: "Gave &a%boss%&r spawn egg to &a%recipient%"
|
give-success: "Gave &a%boss%&r spawn egg to &a%recipient%"
|
||||||
requirements-not-met: "&cYou can't spawn this boss!"
|
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"
|
na: "N/A"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#libreforge-updater
|
#libreforge-updater
|
||||||
#Wed Oct 19 20:44:41 BST 2022
|
#Tue Nov 01 16:23:35 GMT 2022
|
||||||
version=8.100.0
|
version=8.103.0
|
||||||
plugin-name=EcoBosses
|
plugin-name=EcoBosses
|
||||||
|
|||||||
Reference in New Issue
Block a user