mirror of
https://github.com/Auxilor/EcoMobs.git
synced 2025-12-19 15:09:17 +00:00
Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a915752922 | ||
|
|
06eb724bd8 | ||
|
|
18c66ef10c | ||
|
|
ae0c8531b0 | ||
|
|
705eafb9af | ||
|
|
e83ede56f0 | ||
|
|
6bddf72111 | ||
|
|
d32d07f4e2 | ||
|
|
8c40d9861d | ||
|
|
03272f794e | ||
|
|
8ff42da43c | ||
|
|
7f61f6a66a | ||
|
|
c1dde026b7 | ||
|
|
983246a7c4 | ||
|
|
ee32897b1c | ||
|
|
67b38896ca | ||
|
|
39b91bc828 | ||
|
|
e2e7b44a75 | ||
|
|
3c1e5ee192 | ||
|
|
56789f331b | ||
|
|
e99b96132f | ||
|
|
c0297cd3db | ||
|
|
3b798a8ed7 | ||
|
|
bc73201ec5 | ||
|
|
b1365855af |
@@ -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.111.0")
|
||||
implementation("com.willfp:libreforge:3.126.1")
|
||||
implementation("org.joml:joml:1.10.4")
|
||||
}
|
||||
|
||||
|
||||
@@ -79,10 +79,6 @@ class EcoBossesPlugin : LibReforgePlugin() {
|
||||
)
|
||||
}
|
||||
|
||||
override fun getMinimumEcoVersion(): String {
|
||||
return "6.35.1"
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
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.ImmutableList
|
||||
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.ecobosses.EcoBossesPlugin
|
||||
import com.willfp.libreforge.separatorAmbivalent
|
||||
@@ -54,7 +54,7 @@ object Bosses {
|
||||
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")) {
|
||||
// Boss configs are separator ambivalent in order to preserve backwards compatibility
|
||||
|
||||
@@ -158,7 +158,7 @@ class EcoBoss(
|
||||
)
|
||||
}
|
||||
|
||||
val disabledTotemWorlds: List<String> = config.getStrings("spawn.totem.notInWorlds")
|
||||
val disabledTotemWorlds: List<String> = config.getStrings("spawn.totem.not-in-worlds")
|
||||
|
||||
val autoSpawnInterval = config.getInt("spawn.autospawn.interval")
|
||||
|
||||
@@ -305,13 +305,15 @@ class EcoBoss(
|
||||
|
||||
private val currentlyAlive = mutableMapOf<UUID, LivingEcoBoss>()
|
||||
|
||||
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)
|
||||
|
||||
@@ -2,6 +2,10 @@ package com.willfp.ecobosses.commands
|
||||
|
||||
import com.willfp.eco.core.command.impl.PluginCommand
|
||||
import com.willfp.ecobosses.EcoBossesPlugin
|
||||
import com.willfp.ecobosses.bosses.Bosses
|
||||
import com.willfp.libreforge.lrcdb.CommandExport
|
||||
import com.willfp.libreforge.lrcdb.CommandImport
|
||||
import com.willfp.libreforge.lrcdb.ExportableConfig
|
||||
import org.bukkit.command.CommandSender
|
||||
|
||||
class CommandEcobosses(plugin: EcoBossesPlugin) : PluginCommand(
|
||||
@@ -22,5 +26,14 @@ class CommandEcobosses(plugin: EcoBossesPlugin) : PluginCommand(
|
||||
.addSubcommand(CommandKillall(plugin))
|
||||
.addSubcommand(CommandSpawn(plugin))
|
||||
.addSubcommand(CommandGive(plugin))
|
||||
.addSubcommand(CommandImport("bosses", plugin))
|
||||
.addSubcommand(CommandExport(plugin) {
|
||||
Bosses.values().map {
|
||||
ExportableConfig(
|
||||
it.id,
|
||||
it.config
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ class ChunkTicker : BossTicker {
|
||||
}
|
||||
|
||||
if (currentChunk.isLoaded && currentChunk.isForceLoaded) {
|
||||
return;
|
||||
return
|
||||
}
|
||||
|
||||
currentChunk.load()
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
210
eco-core/core-plugin/src/main/resources/bosses/illusioner.yml
Normal file
210
eco-core/core-plugin/src/main/resources/bosses/illusioner.yml
Normal file
@@ -0,0 +1,210 @@
|
||||
mob: illusioner attack-damage:50 health:600 hand:"iron_sword sharpness:5"
|
||||
|
||||
model-engine-id: ""
|
||||
model-engine-animation: ""
|
||||
|
||||
display-name: "&9Illusioner &7| &c%health%♥ &7| &e%time%"
|
||||
|
||||
influence: 40
|
||||
|
||||
custom-ai:
|
||||
enabled: true
|
||||
|
||||
target-goals:
|
||||
- key: minecraft:hurt_by
|
||||
priority: 0
|
||||
args:
|
||||
blacklist: [ ]
|
||||
- key: minecraft:nearest_attackable
|
||||
priority: 1
|
||||
args:
|
||||
target:
|
||||
- player
|
||||
checkVisibility: false
|
||||
checkCanNavigate: true
|
||||
reciprocalChance: 300
|
||||
- key: minecraft:nearest_attackable
|
||||
priority: 2
|
||||
args:
|
||||
target:
|
||||
- iron_golem
|
||||
- villager
|
||||
checkVisibility: false
|
||||
checkCanNavigate: true
|
||||
reciprocalChance: 300
|
||||
|
||||
ai-goals:
|
||||
- key: minecraft:float
|
||||
priority: 0
|
||||
- key: minecraft:illusioner_mirror_spell
|
||||
priority: 1
|
||||
- key: minecraft:melee_attack
|
||||
priority: 2
|
||||
args:
|
||||
speed: 1.6
|
||||
pauseWhenMobIdle: false
|
||||
- key: minecraft:random_stroll
|
||||
priority: 8
|
||||
args:
|
||||
speed: 0.6
|
||||
interval: 80
|
||||
canDespawn: false
|
||||
- key: minecraft:look_at_player
|
||||
priority: 9
|
||||
args:
|
||||
range: 6
|
||||
chance: 1
|
||||
|
||||
effects:
|
||||
- id: run_chain
|
||||
args:
|
||||
chain: blind
|
||||
self_as_victim: true
|
||||
chance: 20
|
||||
triggers:
|
||||
- static_20
|
||||
|
||||
conditions: [ ]
|
||||
|
||||
lifespan: 120
|
||||
|
||||
defence:
|
||||
prevent-mounts: true
|
||||
explosion-immune: true
|
||||
fire-immune: true
|
||||
drowning-immune: true
|
||||
suffocation-immune: true
|
||||
|
||||
melee-damage-multiplier: 1
|
||||
projectile-damage-multiplier: 0.8
|
||||
|
||||
teleportation:
|
||||
enabled: true
|
||||
interval: 200
|
||||
range: 20
|
||||
|
||||
rewards:
|
||||
xp:
|
||||
minimum: 20000
|
||||
maximum: 40000
|
||||
|
||||
top-damager-commands:
|
||||
1:
|
||||
- chance: 100 # As a percentage
|
||||
commands:
|
||||
- eco give %player% 10000
|
||||
2: [ ]
|
||||
3: [ ]
|
||||
|
||||
nearby-player-commands:
|
||||
radius: 10
|
||||
commands: [ ]
|
||||
|
||||
drops: []
|
||||
|
||||
target:
|
||||
mode: closest
|
||||
range: 40
|
||||
|
||||
boss-bar:
|
||||
enabled: true
|
||||
color: blue
|
||||
style: notched_20
|
||||
radius: 120
|
||||
|
||||
spawn:
|
||||
conditions: [ ]
|
||||
autospawn:
|
||||
interval: -1
|
||||
locations: []
|
||||
totem:
|
||||
enabled: false
|
||||
top: carved_pumpkin
|
||||
middle: beacon
|
||||
bottom: diamond_block
|
||||
not-in-worlds: [ ]
|
||||
egg:
|
||||
enabled: true
|
||||
item: dolphin_spawn_egg unbreaking:1 hide_enchants
|
||||
name: "&9Illusioner&f Spawn Egg"
|
||||
lore:
|
||||
- ""
|
||||
- "&8&oPlace on the ground to"
|
||||
- "&8&osummon an &9Illusioner"
|
||||
craftable: true
|
||||
recipe:
|
||||
- ""
|
||||
- fermented_spider_eye 64
|
||||
- ""
|
||||
- fermented_spider_eye 64
|
||||
- ecoitems:boss_core ? nether_star
|
||||
- fermented_spider_eye 64
|
||||
- ""
|
||||
- fermented_spider_eye 64
|
||||
- ""
|
||||
|
||||
commands:
|
||||
spawn: [ ]
|
||||
kill: [ ]
|
||||
despawn: [ ]
|
||||
injure: [ ]
|
||||
|
||||
messages:
|
||||
spawn:
|
||||
- message:
|
||||
- ""
|
||||
- "&fAn &9&lIllusioner&r&f has been spawned!"
|
||||
- "&fCome fight it at &9%x%&f, &9%y%&f, &9%z%&f!"
|
||||
- ""
|
||||
radius: -1
|
||||
|
||||
kill:
|
||||
- message:
|
||||
- ""
|
||||
- "&fThe &9&lIllusioner&r&f has been killed!"
|
||||
- "&fMost Damage:"
|
||||
- "&f - &9%damage_1_player%&f (%damage_1% Damage)"
|
||||
- "&f - &9%damage_2_player%&f (%damage_2% Damage)"
|
||||
- "&f - &9%damage_3_player%&f (%damage_3% Damage)"
|
||||
- ""
|
||||
radius: -1
|
||||
despawn:
|
||||
- message:
|
||||
- ""
|
||||
- "&fYou ran out of time to kill the &9&lIllusioner&r&f!"
|
||||
- ""
|
||||
radius: -1
|
||||
injure: [ ]
|
||||
|
||||
sounds:
|
||||
spawn:
|
||||
- sound: entity_illusioner_mirror_move
|
||||
pitch: 0.5
|
||||
volume: 100
|
||||
- sound: entity_wither_spawn
|
||||
pitch: 2
|
||||
volume: 100
|
||||
|
||||
kill:
|
||||
- sound: entity_evoker_prepare_wololo
|
||||
pitch: 0.8
|
||||
volume: 100
|
||||
- sound: entity_illusioner_prepare_blindness
|
||||
pitch: 1
|
||||
volume: 100
|
||||
- sound: entity_wither_death
|
||||
pitch: 2
|
||||
volume: 100
|
||||
|
||||
despawn:
|
||||
- sound: entity_ender_dragon_ambient
|
||||
pitch: 0.6
|
||||
volume: 50
|
||||
- sound: entity_enderman_death
|
||||
pitch: 0.8
|
||||
volume: 50
|
||||
|
||||
injure:
|
||||
- sound: entity_illusioner_cast_spell
|
||||
pitch: 2
|
||||
volume: 10
|
||||
@@ -1,19 +1,14 @@
|
||||
# Read more about chains: https://plugins.auxilor.io/effects/configuring-an-effect#effect-chains
|
||||
|
||||
chains:
|
||||
- id: example_chain
|
||||
- id: blind
|
||||
effects:
|
||||
- id: teleport
|
||||
- id: potion_effect
|
||||
args:
|
||||
effect: blindness
|
||||
level: 3
|
||||
duration: 30
|
||||
apply_to_player: true
|
||||
- id: send_message
|
||||
args:
|
||||
message: "&fYou have been teleported!"
|
||||
action_bar: true
|
||||
- id: play_sound
|
||||
args:
|
||||
sound: entity_dragon_fireball_explode
|
||||
|
||||
@@ -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
|
||||
@@ -45,6 +52,4 @@ potions:
|
||||
triggered: true
|
||||
particles:
|
||||
permanent: false
|
||||
triggered: true
|
||||
|
||||
share-configs: true # If your configs are allowed to be used to gather data and improve the plugin. Nothing identifying (IP, Name, etc) is shared.
|
||||
triggered: true
|
||||
@@ -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,9 +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!"
|
||||
|
||||
na: "N/A"
|
||||
19
eco-core/core-plugin/src/main/resources/lrcdb.yml
Normal file
19
eco-core/core-plugin/src/main/resources/lrcdb.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
# Options for lrcdb (https://lrcdb.auxilor.io), a website to share configs
|
||||
# with other server owners, so you can get more configs without making them
|
||||
# yourself!
|
||||
|
||||
author: "Unknown Author" # The name attached to configs you export
|
||||
|
||||
# Options about automatically sharing configs you create
|
||||
share-configs:
|
||||
# If you want all your configs to automatically be publicly available,
|
||||
# set this to true. This really helps out other users!
|
||||
publicly: false
|
||||
|
||||
# If you don't want your configs to be usable to gather information about
|
||||
# plugin usage or to improve the plugins in the future, disable this.
|
||||
# Nothing identifying is shared.
|
||||
enabled: true
|
||||
|
||||
# If you disable share-configs, you can still share select configs publicly
|
||||
# with /ecobosses export <config>.
|
||||
@@ -42,6 +42,8 @@ permissions:
|
||||
ecobosses.command.reload: true
|
||||
ecobosses.command.spawn: true
|
||||
ecobosses.command.give: true
|
||||
ecobosses.command.import: true
|
||||
ecobosses.command.export: true
|
||||
|
||||
ecobosses.command.ecobosses:
|
||||
description: Allows the use of /ecobosses
|
||||
@@ -61,4 +63,12 @@ permissions:
|
||||
|
||||
ecobosses.command.reload:
|
||||
description: Allows the use of /ecobosses reload
|
||||
default: op
|
||||
|
||||
ecobosses.command.import:
|
||||
description: Allows the use of /ecobosses import
|
||||
default: op
|
||||
|
||||
ecobosses.command.export:
|
||||
description: Allows the use of /ecobosses export
|
||||
default: op
|
||||
@@ -1,4 +1,4 @@
|
||||
#libreforge-updater
|
||||
#Sun Oct 09 15:03:11 BST 2022
|
||||
version=8.97.0
|
||||
#Mon Dec 12 14:01:34 GMT 2022
|
||||
version=8.112.1
|
||||
plugin-name=EcoBosses
|
||||
|
||||
Reference in New Issue
Block a user