mirror of
https://github.com/Auxilor/EcoMobs.git
synced 2025-12-19 23:19:17 +00:00
Compare commits
63 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b4c81d7874 | ||
|
|
fb78e87bd0 | ||
|
|
fd4b3bcc76 | ||
|
|
f1d02cc3ba | ||
|
|
78135d7e72 | ||
|
|
ed0fd90df8 | ||
|
|
42af89c79a | ||
|
|
d453461eeb | ||
|
|
e4093a0fd5 | ||
|
|
7e950ea508 | ||
|
|
ac79baa2d3 | ||
|
|
50adfae567 | ||
|
|
153022c3bf | ||
|
|
8d37635381 | ||
|
|
299d3ee1d6 | ||
|
|
f0a2d32b95 | ||
|
|
4e86750c7d | ||
|
|
b3b7695218 | ||
|
|
1aa0a27c65 | ||
|
|
392a76bad8 | ||
|
|
95afe96860 | ||
|
|
21d24a5198 | ||
|
|
af9766a391 | ||
|
|
df70871bad | ||
|
|
b030af609a | ||
|
|
344e71cd9a | ||
|
|
7b7a16f9c6 | ||
|
|
ba1c348f8e | ||
|
|
c81f7174e2 | ||
|
|
53b037816d | ||
|
|
d7e07c1a62 | ||
|
|
d939296d96 | ||
|
|
2505ddd845 | ||
|
|
ea7371db9e | ||
|
|
b53ab306ed | ||
|
|
33f82117e4 | ||
|
|
a80e060a7e | ||
|
|
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 | ||
|
|
1ce50cb0b9 |
7
.github/ISSUE_TEMPLATE/config.yml
vendored
7
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -1,8 +1,5 @@
|
|||||||
blank_issues_enabled: false
|
blank_issues_enabled: false
|
||||||
contact_links:
|
contact_links:
|
||||||
- name: Auxilor Community Discord
|
- name: Discord
|
||||||
url: https://discord.gg/ZcwpSsE/
|
url: https://discord.gg/ZcwpSsE/
|
||||||
about: Join the Auxilor discord to get help from support staff and the general community!
|
about: Issues have moved to Discord, please join the server to get help!
|
||||||
- name: The most common issues people have
|
|
||||||
url: https://github.com/Auxilor/eco/issues/78
|
|
||||||
about: Check the list of known common issues to see if your issue has already been solved
|
|
||||||
|
|||||||
24
.github/ISSUE_TEMPLATE/report-a-bug.md
vendored
24
.github/ISSUE_TEMPLATE/report-a-bug.md
vendored
@@ -4,28 +4,8 @@ about: Report an issue with the plugin
|
|||||||
title: ''
|
title: ''
|
||||||
labels: bug
|
labels: bug
|
||||||
assignees: ''
|
assignees: ''
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
**Describe the bug**
|
# Please report bugs on the discord!
|
||||||
A clear and concise description of what the bug is.
|
|
||||||
|
|
||||||
**To Reproduce**
|
[Join by clicking here](https://discord.gg/ZcwpSsE/)
|
||||||
Steps to reproduce the behavior:
|
|
||||||
1. Go to '...'
|
|
||||||
2. Click on '....'
|
|
||||||
3. Scroll down to '....'
|
|
||||||
4. See error
|
|
||||||
|
|
||||||
**Expected behavior**
|
|
||||||
A clear and concise description of what you expected to happen.
|
|
||||||
|
|
||||||
**Screenshots**
|
|
||||||
If applicable, add screenshots to help explain your problem.
|
|
||||||
|
|
||||||
**Server Information (please complete the following information):**
|
|
||||||
- Version: (output of `/ver` command)
|
|
||||||
- Version of plugin and eco (`/ver eco`, `/ver <plugin>`)
|
|
||||||
|
|
||||||
**Additional context**
|
|
||||||
Add any other context about the problem here.
|
|
||||||
|
|||||||
20
.github/ISSUE_TEMPLATE/request-a-feature.md
vendored
20
.github/ISSUE_TEMPLATE/request-a-feature.md
vendored
@@ -1,20 +0,0 @@
|
|||||||
---
|
|
||||||
name: Request a Feature
|
|
||||||
about: Suggest an idea for this plugin
|
|
||||||
title: ''
|
|
||||||
labels: enhancement
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**Is your feature request related to a problem? Please describe.**
|
|
||||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
||||||
|
|
||||||
**Describe the solution you'd like**
|
|
||||||
A clear and concise description of what you want to happen.
|
|
||||||
|
|
||||||
**Describe alternatives you've considered**
|
|
||||||
A clear and concise description of any alternative solutions or features you've considered.
|
|
||||||
|
|
||||||
**Additional context**
|
|
||||||
Add any other context or screenshots about the feature request here.
|
|
||||||
33
.github/workflows/publish-release.yml
vendored
Normal file
33
.github/workflows/publish-release.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
name: Publish Packages
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
release:
|
||||||
|
types: [ created ]
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Checkout latest code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up JDK 17
|
||||||
|
uses: actions/setup-java@v2
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: 17
|
||||||
|
|
||||||
|
- name: Change wrapper permissions
|
||||||
|
run: chmod +x ./gradlew
|
||||||
|
|
||||||
|
- name: Publish package
|
||||||
|
uses: gradle/gradle-build-action@v2
|
||||||
|
with:
|
||||||
|
arguments: publish
|
||||||
|
env:
|
||||||
|
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
|
||||||
|
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
|
||||||
@@ -3,11 +3,13 @@ plugins {
|
|||||||
`java-library`
|
`java-library`
|
||||||
`maven-publish`
|
`maven-publish`
|
||||||
kotlin("jvm") version "1.7.10"
|
kotlin("jvm") version "1.7.10"
|
||||||
id("com.github.johnrengelman.shadow") version "7.0.0"
|
id("com.github.johnrengelman.shadow") version "8.0.0"
|
||||||
|
id("com.willfp.libreforge-gradle-plugin") version "1.0.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "com.willfp"
|
group = "com.willfp"
|
||||||
version = findProperty("version")!!
|
version = findProperty("version")!!
|
||||||
|
val libreforgeVersion = findProperty("libreforge-version")
|
||||||
|
|
||||||
base {
|
base {
|
||||||
archivesName.set(project.name)
|
archivesName.set(project.name)
|
||||||
@@ -22,27 +24,23 @@ dependencies {
|
|||||||
allprojects {
|
allprojects {
|
||||||
apply(plugin = "java")
|
apply(plugin = "java")
|
||||||
apply(plugin = "kotlin")
|
apply(plugin = "kotlin")
|
||||||
|
apply(plugin = "maven-publish")
|
||||||
apply(plugin = "com.github.johnrengelman.shadow")
|
apply(plugin = "com.github.johnrengelman.shadow")
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|
||||||
|
maven("https://repo.papermc.io/repository/maven-public/")
|
||||||
|
maven("https://repo.auxilor.io/repository/maven-public/")
|
||||||
maven("https://jitpack.io")
|
maven("https://jitpack.io")
|
||||||
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
|
|
||||||
maven("https://repo.codemc.org/repository/nms/")
|
|
||||||
maven("https://repo.codemc.org/repository/maven-public")
|
|
||||||
maven("https://repo.dmulloy2.net/nexus/repository/public/")
|
|
||||||
maven("https://papermc.io/repo/repository/maven-public/")
|
|
||||||
maven("https://mvn.lumine.io/repository/maven-public/")
|
maven("https://mvn.lumine.io/repository/maven-public/")
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly("com.willfp:eco:6.35.1")
|
compileOnly("com.willfp:eco:6.53.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.110.0")
|
|
||||||
implementation("org.joml:joml:1.10.4")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
@@ -51,10 +49,13 @@ allprojects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
|
shadowJar {
|
||||||
|
relocate("com.willfp.libreforge.loader", "com.willfp.ecobosses.libreforge.loader")
|
||||||
|
}
|
||||||
|
|
||||||
compileKotlin {
|
compileKotlin {
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = "17"
|
jvmTarget = "17"
|
||||||
freeCompilerArgs = freeCompilerArgs + "-Xjvm-default=all"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,66 +67,17 @@ allprojects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
val ignoreList = listOf("**/*.png", "**/models/**", "**/textures/**", "**lang.yml")
|
filesMatching(listOf("**plugin.yml", "**eco.yml")) {
|
||||||
filesNotMatching(ignoreList) {
|
expand(
|
||||||
expand("projectVersion" to project.version)
|
"version" to project.version,
|
||||||
|
"libreforgeVersion" to libreforgeVersion,
|
||||||
|
"pluginName" to rootProject.name
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
build {
|
build {
|
||||||
dependsOn(shadowJar)
|
dependsOn(shadowJar)
|
||||||
}
|
}
|
||||||
|
|
||||||
shadowJar {
|
|
||||||
relocate("com.willfp.libreforge", "com.willfp.ecobosses.libreforge")
|
|
||||||
relocate("org.joml", "com.willfp.ecobosses.libreforge.joml")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks {
|
|
||||||
shadowJar {
|
|
||||||
destinationDirectory.set(file("$rootDir/bin"))
|
|
||||||
}
|
|
||||||
|
|
||||||
val buyThePlugins by creating {
|
|
||||||
dependsOn(subprojects.map { it.tasks.getByName("build") })
|
|
||||||
|
|
||||||
doLast {
|
|
||||||
println("If you like the plugin, please consider buying it on Spigot or Polymart!")
|
|
||||||
println("Spigot: https://www.spigotmc.org/resources/authors/auxilor.507394/")
|
|
||||||
println("Polymart: https://polymart.org/user/auxilor.1107/")
|
|
||||||
println("Buying gives you access to support and the plugin auto-updater, and it allows me to keep developing plugins.")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
build {
|
|
||||||
dependsOn(shadowJar)
|
|
||||||
dependsOn(publishToMavenLocal)
|
|
||||||
finalizedBy(buyThePlugins)
|
|
||||||
}
|
|
||||||
|
|
||||||
clean.get().doLast { file("$rootDir/bin").deleteRecursively() }
|
|
||||||
|
|
||||||
fun fileName(extra: String): String = buildString {
|
|
||||||
append(findProperty("plugin-name"))
|
|
||||||
append(" v")
|
|
||||||
append(findProperty("version"))
|
|
||||||
if (extra.isNotEmpty()) {
|
|
||||||
append(" ")
|
|
||||||
append(extra)
|
|
||||||
}
|
|
||||||
append(".jar")
|
|
||||||
}
|
|
||||||
|
|
||||||
shadowJar.get().archiveFileName.set(fileName(""))
|
|
||||||
jar.get().archiveFileName.set(fileName("unshaded"))
|
|
||||||
}
|
|
||||||
|
|
||||||
publishing {
|
|
||||||
publications {
|
|
||||||
register("maven", MavenPublication::class) {
|
|
||||||
from(subprojects.first { it.name == "core-plugin" }.components["java"])
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,10 +2,33 @@ group = "com.willfp"
|
|||||||
version = rootProject.version
|
version = rootProject.version
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly("org.spigotmc:spigot-api:1.17.1-R0.1-SNAPSHOT")
|
compileOnly("io.papermc.paper:paper-api:1.19.3-R0.1-SNAPSHOT")
|
||||||
compileOnly("net.kyori:adventure-api:4.9.3")
|
|
||||||
|
|
||||||
// Integrations
|
|
||||||
compileOnly("com.github.lokka30:LevelledMobs:3.1.4")
|
compileOnly("com.github.lokka30:LevelledMobs:3.1.4")
|
||||||
compileOnly("com.ticxo.modelengine:api:R3.0.1")
|
compileOnly("com.ticxo.modelengine:api:R3.1.5")
|
||||||
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
register("maven", MavenPublication::class) {
|
||||||
|
from(components["java"])
|
||||||
|
artifactId = rootProject.name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
name = "auxilor"
|
||||||
|
url = uri("https://repo.auxilor.io/repository/maven-releases/")
|
||||||
|
credentials {
|
||||||
|
username = System.getenv("MAVEN_USERNAME")
|
||||||
|
password = System.getenv("MAVEN_PASSWORD")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks {
|
||||||
|
build {
|
||||||
|
dependsOn(publishToMavenLocal)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,12 +6,15 @@ import com.willfp.eco.core.integrations.IntegrationLoader
|
|||||||
import com.willfp.ecobosses.bosses.Bosses
|
import com.willfp.ecobosses.bosses.Bosses
|
||||||
import com.willfp.ecobosses.bosses.EggDisplay
|
import com.willfp.ecobosses.bosses.EggDisplay
|
||||||
import com.willfp.ecobosses.bosses.bossHolders
|
import com.willfp.ecobosses.bosses.bossHolders
|
||||||
import com.willfp.ecobosses.commands.CommandEcobosses
|
import com.willfp.ecobosses.commands.CommandEcoBosses
|
||||||
import com.willfp.ecobosses.defence.DamageMultiplierHandler
|
import com.willfp.ecobosses.defence.DamageMultiplierHandler
|
||||||
import com.willfp.ecobosses.defence.ImmunitiesHandler
|
import com.willfp.ecobosses.defence.ImmunitiesHandler
|
||||||
import com.willfp.ecobosses.defence.MountHandler
|
import com.willfp.ecobosses.defence.MountHandler
|
||||||
import com.willfp.ecobosses.defence.PickupHandler
|
import com.willfp.ecobosses.defence.PickupHandler
|
||||||
import com.willfp.ecobosses.integrations.levelledmobs.IntegrationLevelledMobs
|
import com.willfp.ecobosses.integrations.levelledmobs.IntegrationLevelledMobs
|
||||||
|
import com.willfp.ecobosses.libreforge.EffectBossDropChanceMultiplier
|
||||||
|
import com.willfp.ecobosses.libreforge.TriggerKillBoss
|
||||||
|
import com.willfp.ecobosses.libreforge.TriggerSpawnBoss
|
||||||
import com.willfp.ecobosses.lifecycle.CompatibilityListeners
|
import com.willfp.ecobosses.lifecycle.CompatibilityListeners
|
||||||
import com.willfp.ecobosses.lifecycle.ConsoleLoggers
|
import com.willfp.ecobosses.lifecycle.ConsoleLoggers
|
||||||
import com.willfp.ecobosses.lifecycle.DeathListeners
|
import com.willfp.ecobosses.lifecycle.DeathListeners
|
||||||
@@ -21,28 +24,39 @@ import com.willfp.ecobosses.spawn.SpawnEggHandler
|
|||||||
import com.willfp.ecobosses.spawn.SpawnTotemHandler
|
import com.willfp.ecobosses.spawn.SpawnTotemHandler
|
||||||
import com.willfp.ecobosses.util.DiscoverRecipeListener
|
import com.willfp.ecobosses.util.DiscoverRecipeListener
|
||||||
import com.willfp.ecobosses.util.TopDamagerListener
|
import com.willfp.ecobosses.util.TopDamagerListener
|
||||||
import com.willfp.libreforge.LibReforgePlugin
|
import com.willfp.libreforge.effects.Effects
|
||||||
|
import com.willfp.libreforge.loader.LibreforgePlugin
|
||||||
|
import com.willfp.libreforge.loader.configs.ConfigCategory
|
||||||
|
import com.willfp.libreforge.registerHolderProvider
|
||||||
|
import com.willfp.libreforge.triggers.Triggers
|
||||||
import org.bukkit.event.Listener
|
import org.bukkit.event.Listener
|
||||||
|
|
||||||
class EcoBossesPlugin : LibReforgePlugin() {
|
class EcoBossesPlugin : LibreforgePlugin() {
|
||||||
init {
|
init {
|
||||||
instance = this
|
instance = this
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun loadConfigCategories(): List<ConfigCategory> {
|
||||||
|
return listOf(
|
||||||
|
Bosses
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun handleEnable() {
|
||||||
|
Effects.register(EffectBossDropChanceMultiplier)
|
||||||
|
Triggers.register(TriggerKillBoss)
|
||||||
|
Triggers.register(TriggerSpawnBoss)
|
||||||
|
|
||||||
registerHolderProvider { it.bossHolders }
|
registerHolderProvider { it.bossHolders }
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun handleEnableAdditional() {
|
override fun handleReload() {
|
||||||
this.copyConfigs("bosses")
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun handleReloadAdditional() {
|
|
||||||
Bosses.getAllAlive().forEach { it.remove() }
|
Bosses.getAllAlive().forEach { it.remove() }
|
||||||
|
|
||||||
logger.info(Bosses.values().size.toString() + " Bosses Loaded")
|
|
||||||
|
|
||||||
AutospawnHandler.startSpawning(this)
|
AutospawnHandler.startSpawning(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun handleDisableAdditional() {
|
override fun handleDisable() {
|
||||||
Bosses.getAllAlive().forEach { it.remove() }
|
Bosses.getAllAlive().forEach { it.remove() }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,7 +66,7 @@ class EcoBossesPlugin : LibReforgePlugin() {
|
|||||||
|
|
||||||
override fun loadPluginCommands(): List<PluginCommand> {
|
override fun loadPluginCommands(): List<PluginCommand> {
|
||||||
return listOf(
|
return listOf(
|
||||||
CommandEcobosses(this)
|
CommandEcoBosses(this)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,16 +87,12 @@ class EcoBossesPlugin : LibReforgePlugin() {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun loadAdditionalIntegrations(): List<IntegrationLoader> {
|
override fun loadIntegrationLoaders(): List<IntegrationLoader> {
|
||||||
return listOf(
|
return listOf(
|
||||||
IntegrationLoader("LevelledMobs") { this.eventManager.registerListener(IntegrationLevelledMobs()) }
|
IntegrationLoader("LevelledMobs") { this.eventManager.registerListener(IntegrationLevelledMobs()) }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getMinimumEcoVersion(): String {
|
|
||||||
return "6.35.1"
|
|
||||||
}
|
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
lateinit var instance: EcoBossesPlugin
|
lateinit var instance: EcoBossesPlugin
|
||||||
|
|||||||
@@ -2,15 +2,15 @@ package com.willfp.ecobosses.bosses
|
|||||||
|
|
||||||
import com.willfp.eco.core.fast.fast
|
import com.willfp.eco.core.fast.fast
|
||||||
import com.willfp.ecobosses.EcoBossesPlugin
|
import com.willfp.ecobosses.EcoBossesPlugin
|
||||||
import com.willfp.libreforge.Holder
|
import com.willfp.ecobosses.util.EntityProvidedHolder
|
||||||
import org.bukkit.entity.Player
|
import org.bukkit.entity.Player
|
||||||
import org.bukkit.inventory.ItemStack
|
import org.bukkit.inventory.ItemStack
|
||||||
import org.bukkit.persistence.PersistentDataType
|
import org.bukkit.persistence.PersistentDataType
|
||||||
import kotlin.math.pow
|
import kotlin.math.pow
|
||||||
|
|
||||||
val Player.bossHolders: Iterable<Holder>
|
val Player.bossHolders: Collection<EntityProvidedHolder>
|
||||||
get() {
|
get() {
|
||||||
val holders = mutableListOf<Holder>()
|
val holders = mutableListOf<EntityProvidedHolder>()
|
||||||
|
|
||||||
for (boss in Bosses.values()) {
|
for (boss in Bosses.values()) {
|
||||||
for (livingBoss in boss.getAllAlive()) {
|
for (livingBoss in boss.getAllAlive()) {
|
||||||
@@ -21,7 +21,7 @@ val Player.bossHolders: Iterable<Holder>
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (entity.location.distanceSquared(this.location) <= boss.influence.pow(2)) {
|
if (entity.location.distanceSquared(this.location) <= boss.influence.pow(2)) {
|
||||||
holders.add(boss)
|
holders.add(EntityProvidedHolder(boss, entity))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -38,7 +38,7 @@ var ItemStack.bossEgg: EcoBoss?
|
|||||||
if (value == null) {
|
if (value == null) {
|
||||||
pdc.remove(spawnEggKey)
|
pdc.remove(spawnEggKey)
|
||||||
} else {
|
} else {
|
||||||
pdc.set(spawnEggKey, PersistentDataType.STRING, value.id)
|
pdc.set(spawnEggKey, PersistentDataType.STRING, value.id.key)
|
||||||
}
|
}
|
||||||
this.itemMeta = meta
|
this.itemMeta = meta
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,21 +1,29 @@
|
|||||||
package com.willfp.ecobosses.bosses
|
package com.willfp.ecobosses.bosses
|
||||||
|
|
||||||
import com.google.common.collect.BiMap
|
|
||||||
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.interfaces.Config
|
||||||
|
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.eco.core.registry.Registry
|
||||||
import com.willfp.ecobosses.EcoBossesPlugin
|
import com.willfp.ecobosses.EcoBossesPlugin
|
||||||
|
import com.willfp.libreforge.loader.LibreforgePlugin
|
||||||
|
import com.willfp.libreforge.loader.configs.ConfigCategory
|
||||||
|
import com.willfp.libreforge.loader.configs.LegacyLocation
|
||||||
import com.willfp.libreforge.separatorAmbivalent
|
import com.willfp.libreforge.separatorAmbivalent
|
||||||
import org.bukkit.entity.Entity
|
import org.bukkit.entity.Entity
|
||||||
import org.bukkit.entity.LivingEntity
|
import org.bukkit.entity.LivingEntity
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.util.UUID
|
import java.util.UUID
|
||||||
|
|
||||||
object Bosses {
|
object Bosses : ConfigCategory("boss", "bosses") {
|
||||||
/** Registered bosses. */
|
/** Registered bosses. */
|
||||||
private val BY_ID: BiMap<String, EcoBoss> = HashBiMap.create()
|
private val registry = Registry<EcoBoss>()
|
||||||
|
|
||||||
|
override val legacyLocation = LegacyLocation(
|
||||||
|
"ecobosses.yml",
|
||||||
|
"bosses"
|
||||||
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all registered [EcoBoss]s.
|
* Get all registered [EcoBoss]s.
|
||||||
@@ -24,7 +32,7 @@ object Bosses {
|
|||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun values(): List<EcoBoss> {
|
fun values(): List<EcoBoss> {
|
||||||
return ImmutableList.copyOf(BY_ID.values)
|
return ImmutableList.copyOf(registry.values())
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -35,52 +43,15 @@ object Bosses {
|
|||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun getByID(name: String): EcoBoss? {
|
fun getByID(name: String): EcoBoss? {
|
||||||
return BY_ID[name]
|
return registry[name]
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
override fun clear(plugin: LibreforgePlugin) {
|
||||||
* Update all [EcoBoss]s.
|
registry.clear()
|
||||||
*
|
|
||||||
* @param plugin Instance of EcoBosses.
|
|
||||||
*/
|
|
||||||
@ConfigUpdater
|
|
||||||
@JvmStatic
|
|
||||||
fun update(plugin: EcoBossesPlugin) {
|
|
||||||
for (boss in values()) {
|
|
||||||
removeBoss(boss)
|
|
||||||
}
|
|
||||||
|
|
||||||
for ((id, config) in plugin.fetchConfigs("bosses")) {
|
|
||||||
addNewBoss(EcoBoss(id, config, plugin))
|
|
||||||
}
|
|
||||||
|
|
||||||
val ecoBossesYml = TransientConfig(File(plugin.dataFolder, "ecobosses.yml"), ConfigType.YAML)
|
|
||||||
|
|
||||||
for (bossConfig in ecoBossesYml.getSubsections("bosses")) {
|
|
||||||
// Boss configs are separator ambivalent in order to preserve backwards compatibility
|
|
||||||
addNewBoss(EcoBoss(bossConfig.getString("id"), bossConfig.separatorAmbivalent(), plugin))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
override fun acceptConfig(plugin: LibreforgePlugin, id: String, config: Config) {
|
||||||
* Add new [EcoBoss] to EcoBosses.
|
registry.register(EcoBoss(id, config, plugin as EcoBossesPlugin))
|
||||||
*
|
|
||||||
* @param set The [EcoBoss] to add.
|
|
||||||
*/
|
|
||||||
@JvmStatic
|
|
||||||
fun addNewBoss(set: EcoBoss) {
|
|
||||||
BY_ID.remove(set.id)
|
|
||||||
BY_ID[set.id] = set
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove [EcoBoss] from EcoBosses.
|
|
||||||
*
|
|
||||||
* @param set The [EcoBoss] to remove.
|
|
||||||
*/
|
|
||||||
@JvmStatic
|
|
||||||
fun removeBoss(set: EcoBoss) {
|
|
||||||
BY_ID.remove(set.id)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import com.willfp.eco.core.items.builder.ItemStackBuilder
|
|||||||
import com.willfp.eco.core.recipe.Recipes
|
import com.willfp.eco.core.recipe.Recipes
|
||||||
import com.willfp.eco.core.recipe.parts.EmptyTestableItem
|
import com.willfp.eco.core.recipe.parts.EmptyTestableItem
|
||||||
import com.willfp.eco.core.recipe.recipes.CraftingRecipe
|
import com.willfp.eco.core.recipe.recipes.CraftingRecipe
|
||||||
|
import com.willfp.eco.core.registry.Registrable
|
||||||
import com.willfp.eco.util.NamespacedKeyUtils
|
import com.willfp.eco.util.NamespacedKeyUtils
|
||||||
import com.willfp.eco.util.toComponent
|
import com.willfp.eco.util.toComponent
|
||||||
import com.willfp.ecobosses.events.BossKillEvent
|
import com.willfp.ecobosses.events.BossKillEvent
|
||||||
@@ -38,6 +39,7 @@ import com.willfp.ecobosses.util.SpawnTotem
|
|||||||
import com.willfp.ecobosses.util.XpReward
|
import com.willfp.ecobosses.util.XpReward
|
||||||
import com.willfp.ecobosses.util.topDamagers
|
import com.willfp.ecobosses.util.topDamagers
|
||||||
import com.willfp.libreforge.Holder
|
import com.willfp.libreforge.Holder
|
||||||
|
import com.willfp.libreforge.ViolationContext
|
||||||
import com.willfp.libreforge.conditions.Conditions
|
import com.willfp.libreforge.conditions.Conditions
|
||||||
import com.willfp.libreforge.effects.Effects
|
import com.willfp.libreforge.effects.Effects
|
||||||
import net.kyori.adventure.bossbar.BossBar
|
import net.kyori.adventure.bossbar.BossBar
|
||||||
@@ -53,10 +55,12 @@ import java.util.Objects
|
|||||||
import java.util.UUID
|
import java.util.UUID
|
||||||
|
|
||||||
class EcoBoss(
|
class EcoBoss(
|
||||||
override val id: String,
|
id: String,
|
||||||
val config: Config,
|
val config: Config,
|
||||||
private val plugin: EcoPlugin
|
private val plugin: EcoPlugin
|
||||||
) : Holder {
|
) : Holder, Registrable {
|
||||||
|
override val id = plugin.createNamespacedKey(id)
|
||||||
|
|
||||||
val displayName: String = config.getString("display-name")
|
val displayName: String = config.getString("display-name")
|
||||||
|
|
||||||
val lifespan = config.getInt("lifespan")
|
val lifespan = config.getInt("lifespan")
|
||||||
@@ -138,7 +142,7 @@ class EcoBoss(
|
|||||||
|
|
||||||
val recipe = Recipes.createAndRegisterRecipe(
|
val recipe = Recipes.createAndRegisterRecipe(
|
||||||
this@EcoBoss.plugin,
|
this@EcoBoss.plugin,
|
||||||
"${this.id}_spawn_egg",
|
"${this.id.key}_spawn_egg",
|
||||||
spawnEggBacker,
|
spawnEggBacker,
|
||||||
config.getStrings("spawn.egg.recipe")
|
config.getStrings("spawn.egg.recipe")
|
||||||
)
|
)
|
||||||
@@ -158,7 +162,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")
|
val autoSpawnInterval = config.getInt("spawn.autospawn.interval")
|
||||||
|
|
||||||
@@ -192,9 +196,10 @@ class EcoBoss(
|
|||||||
ConfiguredGoal(it.getInt("priority"), goal)
|
ConfiguredGoal(it.getInt("priority"), goal)
|
||||||
}
|
}
|
||||||
|
|
||||||
val spawnConditions = config.getSubsections("spawn.conditions").mapNotNull {
|
val spawnConditions = Conditions.compile(
|
||||||
Conditions.compile(it, "$id Spawn Conditions")
|
config.getSubsections("spawn.conditions"),
|
||||||
}
|
ViolationContext(plugin, "$id Spawn Conditions")
|
||||||
|
)
|
||||||
|
|
||||||
private val bossBarColor = BossBar.Color.valueOf(config.getString("boss-bar.color").uppercase())
|
private val bossBarColor = BossBar.Color.valueOf(config.getString("boss-bar.color").uppercase())
|
||||||
|
|
||||||
@@ -305,13 +310,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()
|
ViolationContext(plugin, "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()
|
ViolationContext(plugin, "Boss ID $id")
|
||||||
|
)
|
||||||
|
|
||||||
fun markDead(uuid: UUID) {
|
fun markDead(uuid: UUID) {
|
||||||
currentlyAlive.remove(uuid)
|
currentlyAlive.remove(uuid)
|
||||||
@@ -337,7 +344,7 @@ class EcoBoss(
|
|||||||
mob.persistentDataContainer.set(
|
mob.persistentDataContainer.set(
|
||||||
plugin.namespacedKeyFactory.create("boss"),
|
plugin.namespacedKeyFactory.create("boss"),
|
||||||
PersistentDataType.STRING,
|
PersistentDataType.STRING,
|
||||||
this.id
|
this.id.key
|
||||||
)
|
)
|
||||||
|
|
||||||
if (hasCustomAI) {
|
if (hasCustomAI) {
|
||||||
@@ -468,6 +475,10 @@ class EcoBoss(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun getID(): String {
|
||||||
|
return this.id.key
|
||||||
|
}
|
||||||
|
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun equals(other: Any?): Boolean {
|
||||||
if (other !is EcoBoss) {
|
if (other !is EcoBoss) {
|
||||||
return false
|
return false
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.willfp.eco.core.display.Display
|
|||||||
import com.willfp.eco.core.display.DisplayModule
|
import com.willfp.eco.core.display.DisplayModule
|
||||||
import com.willfp.eco.core.display.DisplayPriority
|
import com.willfp.eco.core.display.DisplayPriority
|
||||||
import com.willfp.eco.core.fast.fast
|
import com.willfp.eco.core.fast.fast
|
||||||
|
import com.willfp.libreforge.SimpleProvidedHolder
|
||||||
import org.bukkit.entity.Player
|
import org.bukkit.entity.Player
|
||||||
import org.bukkit.inventory.ItemStack
|
import org.bukkit.inventory.ItemStack
|
||||||
|
|
||||||
@@ -26,8 +27,8 @@ class EggDisplay(
|
|||||||
val egg = itemStack.bossEgg ?: return
|
val egg = itemStack.bossEgg ?: return
|
||||||
|
|
||||||
val lines = egg.spawnConditions
|
val lines = egg.spawnConditions
|
||||||
.filterNot { it.isMet(player) }
|
.filterNot { it.isMet(player, SimpleProvidedHolder(egg)) }
|
||||||
.mapNotNull { it.notMetLines?.map { line -> Display.PREFIX + line } }
|
.map { it.notMetLines.map { line -> Display.PREFIX + line } }
|
||||||
.flatten()
|
.flatten()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import com.willfp.eco.core.command.impl.PluginCommand
|
|||||||
import com.willfp.ecobosses.EcoBossesPlugin
|
import com.willfp.ecobosses.EcoBossesPlugin
|
||||||
import org.bukkit.command.CommandSender
|
import org.bukkit.command.CommandSender
|
||||||
|
|
||||||
class CommandEcobosses(plugin: EcoBossesPlugin) : PluginCommand(
|
class CommandEcoBosses(plugin: EcoBossesPlugin) : PluginCommand(
|
||||||
plugin,
|
plugin,
|
||||||
"ecobosses",
|
"ecobosses",
|
||||||
"ecobosses.command.ecobosses",
|
"ecobosses.command.ecobosses",
|
||||||
@@ -47,7 +47,7 @@ class CommandGive(plugin: EcoPlugin) : Subcommand(
|
|||||||
}
|
}
|
||||||
|
|
||||||
var message = plugin.langYml.getMessage("give-success")
|
var message = plugin.langYml.getMessage("give-success")
|
||||||
message = message.replace("%boss%", boss.id).replace("%recipient%", reciever.name)
|
message = message.replace("%boss%", boss.id.key).replace("%recipient%", reciever.name)
|
||||||
sender.sendMessage(message)
|
sender.sendMessage(message)
|
||||||
|
|
||||||
val itemStack = boss.spawnEgg!!
|
val itemStack = boss.spawnEgg!!
|
||||||
@@ -94,7 +94,7 @@ class CommandGive(plugin: EcoPlugin) : Subcommand(
|
|||||||
* The cached names.
|
* The cached names.
|
||||||
*/
|
*/
|
||||||
private val BOSS_NAMES: List<String>
|
private val BOSS_NAMES: List<String>
|
||||||
get() = Bosses.values().map { it.id }
|
get() = Bosses.values().map { it.id.key }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ class CommandSpawn(plugin: EcoBossesPlugin) : Subcommand(
|
|||||||
* The cached names.
|
* The cached names.
|
||||||
*/
|
*/
|
||||||
private val BOSS_NAMES: List<String>
|
private val BOSS_NAMES: List<String>
|
||||||
get() = Bosses.values().map { it.id }
|
get() = Bosses.values().map { it.id.key }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The cached numbers.
|
* The cached numbers.
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.willfp.ecobosses.libreforge
|
||||||
|
|
||||||
|
import com.willfp.ecobosses.bosses.Bosses
|
||||||
|
import com.willfp.ecobosses.bosses.EcoBoss
|
||||||
|
import com.willfp.ecobosses.events.BossTryDropItemEvent
|
||||||
|
import com.willfp.libreforge.effects.templates.MultiMultiplierEffect
|
||||||
|
import org.bukkit.event.EventHandler
|
||||||
|
|
||||||
|
object EffectBossDropChanceMultiplier : MultiMultiplierEffect<EcoBoss>("boss_drop_chance_multiplier") {
|
||||||
|
override val key = "bosses"
|
||||||
|
|
||||||
|
override fun getElement(key: String): EcoBoss? {
|
||||||
|
return Bosses.getByID(key)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getAllElements(): Collection<EcoBoss> {
|
||||||
|
return Bosses.values()
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler(ignoreCancelled = true)
|
||||||
|
fun handle(event: BossTryDropItemEvent) {
|
||||||
|
val player = event.player ?: return
|
||||||
|
|
||||||
|
val multiplier = getMultiplier(player, event.boss)
|
||||||
|
|
||||||
|
event.chance *= multiplier
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package com.willfp.ecobosses.libreforge
|
||||||
|
|
||||||
|
import com.willfp.ecobosses.events.BossKillEvent
|
||||||
|
import com.willfp.libreforge.triggers.Trigger
|
||||||
|
import com.willfp.libreforge.triggers.TriggerData
|
||||||
|
import com.willfp.libreforge.triggers.TriggerParameter
|
||||||
|
import org.bukkit.attribute.Attribute
|
||||||
|
import org.bukkit.event.EventHandler
|
||||||
|
|
||||||
|
object TriggerKillBoss : Trigger("kill_boss") {
|
||||||
|
override val parameters = setOf(
|
||||||
|
TriggerParameter.PLAYER,
|
||||||
|
TriggerParameter.VICTIM,
|
||||||
|
TriggerParameter.LOCATION
|
||||||
|
)
|
||||||
|
|
||||||
|
@EventHandler(ignoreCancelled = true)
|
||||||
|
fun handle(event: BossKillEvent) {
|
||||||
|
val killer = event.killer ?: return
|
||||||
|
val entity = event.boss.entity
|
||||||
|
|
||||||
|
this.dispatch(
|
||||||
|
killer,
|
||||||
|
TriggerData(
|
||||||
|
player = killer,
|
||||||
|
victim = entity,
|
||||||
|
location = entity.location,
|
||||||
|
value = entity.getAttribute(Attribute.GENERIC_MAX_HEALTH)!!.value
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.willfp.ecobosses.libreforge
|
||||||
|
|
||||||
|
import com.willfp.ecobosses.events.BossSpawnEvent
|
||||||
|
import com.willfp.libreforge.triggers.Trigger
|
||||||
|
import com.willfp.libreforge.triggers.TriggerData
|
||||||
|
import com.willfp.libreforge.triggers.TriggerParameter
|
||||||
|
import org.bukkit.event.EventHandler
|
||||||
|
|
||||||
|
object TriggerSpawnBoss : Trigger("spawn_boss") {
|
||||||
|
override val parameters = setOf(
|
||||||
|
TriggerParameter.PLAYER,
|
||||||
|
TriggerParameter.LOCATION
|
||||||
|
)
|
||||||
|
|
||||||
|
@EventHandler(ignoreCancelled = true)
|
||||||
|
fun handle(event: BossSpawnEvent) {
|
||||||
|
val player = event.spawner ?: return
|
||||||
|
val location = event.location
|
||||||
|
|
||||||
|
this.dispatch(
|
||||||
|
player,
|
||||||
|
TriggerData(
|
||||||
|
player = player,
|
||||||
|
location = location
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
package com.willfp.ecobosses.lifecycle
|
package com.willfp.ecobosses.lifecycle
|
||||||
|
|
||||||
|
import com.willfp.eco.core.EcoPlugin
|
||||||
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
|
||||||
import com.willfp.libreforge.LibReforgePlugin
|
|
||||||
import org.bukkit.event.EventHandler
|
import org.bukkit.event.EventHandler
|
||||||
import org.bukkit.event.EventPriority
|
import org.bukkit.event.EventPriority
|
||||||
import org.bukkit.event.Listener
|
import org.bukkit.event.Listener
|
||||||
|
|
||||||
class ConsoleLoggers(
|
class ConsoleLoggers(
|
||||||
private val plugin: LibReforgePlugin
|
private val plugin: EcoPlugin
|
||||||
) : Listener {
|
) : Listener {
|
||||||
@EventHandler(
|
@EventHandler(
|
||||||
ignoreCancelled = true,
|
ignoreCancelled = true,
|
||||||
|
|||||||
@@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package com.willfp.ecobosses.spawn
|
|||||||
import com.willfp.ecobosses.EcoBossesPlugin
|
import com.willfp.ecobosses.EcoBossesPlugin
|
||||||
import com.willfp.ecobosses.bosses.bossEgg
|
import com.willfp.ecobosses.bosses.bossEgg
|
||||||
import com.willfp.ecobosses.events.BossSpawnEvent
|
import com.willfp.ecobosses.events.BossSpawnEvent
|
||||||
import com.willfp.libreforge.conditions.isMet
|
import com.willfp.libreforge.SimpleProvidedHolder
|
||||||
import org.bukkit.Bukkit
|
import org.bukkit.Bukkit
|
||||||
import org.bukkit.Location
|
import org.bukkit.Location
|
||||||
import org.bukkit.block.Container
|
import org.bukkit.block.Container
|
||||||
@@ -79,7 +79,7 @@ class SpawnEggHandler(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
if (!boss.spawnConditions.isMet(player)) {
|
if (!boss.spawnConditions.areMet(player, SimpleProvidedHolder(boss))) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.willfp.eco.util.containsIgnoreCase
|
|||||||
import com.willfp.ecobosses.bosses.Bosses
|
import com.willfp.ecobosses.bosses.Bosses
|
||||||
import com.willfp.ecobosses.events.BossSpawnEvent
|
import com.willfp.ecobosses.events.BossSpawnEvent
|
||||||
import com.willfp.ecobosses.util.SpawnTotem
|
import com.willfp.ecobosses.util.SpawnTotem
|
||||||
|
import com.willfp.libreforge.SimpleProvidedHolder
|
||||||
import org.bukkit.Bukkit
|
import org.bukkit.Bukkit
|
||||||
import org.bukkit.Material
|
import org.bukkit.Material
|
||||||
import org.bukkit.block.Block
|
import org.bukkit.block.Block
|
||||||
@@ -28,11 +29,13 @@ class SpawnTotemHandler : Listener {
|
|||||||
middle = event.block.getRelative(0, -1, 0)
|
middle = event.block.getRelative(0, -1, 0)
|
||||||
bottom = event.block.getRelative(0, -2, 0)
|
bottom = event.block.getRelative(0, -2, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
1 -> {
|
1 -> {
|
||||||
top = event.block.getRelative(0, 2, 0)
|
top = event.block.getRelative(0, 2, 0)
|
||||||
middle = event.block.getRelative(0, 1, 0)
|
middle = event.block.getRelative(0, 1, 0)
|
||||||
bottom = event.block
|
bottom = event.block
|
||||||
}
|
}
|
||||||
|
|
||||||
2 -> {
|
2 -> {
|
||||||
top = event.block.getRelative(0, 1, 0)
|
top = event.block.getRelative(0, 1, 0)
|
||||||
middle = event.block
|
middle = event.block
|
||||||
@@ -52,7 +55,7 @@ class SpawnTotemHandler : Listener {
|
|||||||
|
|
||||||
val player = event.player
|
val player = event.player
|
||||||
|
|
||||||
if (!boss.spawnConditions.all { it.condition.isConditionMet(player, it.config) }) {
|
if (!boss.spawnConditions.areMet(player, SimpleProvidedHolder(boss))) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ class BossBarTicker(
|
|||||||
override fun tick(boss: LivingEcoBoss, tick: Int) {
|
override fun tick(boss: LivingEcoBoss, tick: Int) {
|
||||||
val entity = boss.entity
|
val entity = boss.entity
|
||||||
|
|
||||||
|
@Suppress("DEPRECATION")
|
||||||
bar.name(entity.customName!!.toComponent())
|
bar.name(entity.customName!!.toComponent())
|
||||||
bar.progress((entity.health / entity.getAttribute(Attribute.GENERIC_MAX_HEALTH)!!.value).toFloat())
|
bar.progress((entity.health / entity.getAttribute(Attribute.GENERIC_MAX_HEALTH)!!.value).toFloat())
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class ChunkTicker : BossTicker {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (currentChunk.isLoaded && currentChunk.isForceLoaded) {
|
if (currentChunk.isLoaded && currentChunk.isForceLoaded) {
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
currentChunk.load()
|
currentChunk.load()
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ class DisplayNameTicker : BossTicker {
|
|||||||
|
|
||||||
val formattedTime = String.format("%d:%02d", timeLeft / 60, timeLeft % 60)
|
val formattedTime = String.format("%d:%02d", timeLeft / 60, timeLeft % 60)
|
||||||
|
|
||||||
|
@Suppress("DEPRECATION")
|
||||||
entity.customName = boss.boss.displayName
|
entity.customName = boss.boss.displayName
|
||||||
.replace("%health%", NumberUtils.format(entity.health))
|
.replace("%health%", NumberUtils.format(entity.health))
|
||||||
.replace("%time%", formattedTime)
|
.replace("%time%", formattedTime)
|
||||||
|
|||||||
@@ -14,11 +14,6 @@ class LifespanTicker : BossTicker {
|
|||||||
Bukkit.getPluginManager().callEvent(event)
|
Bukkit.getPluginManager().callEvent(event)
|
||||||
|
|
||||||
boss.remove()
|
boss.remove()
|
||||||
boss.boss.handleLifecycle(
|
|
||||||
BossLifecycle.DESPAWN,
|
|
||||||
boss.entity.location,
|
|
||||||
boss.entity
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.willfp.ecobosses.util
|
||||||
|
|
||||||
|
import com.willfp.libreforge.Holder
|
||||||
|
import com.willfp.libreforge.ProvidedHolder
|
||||||
|
import org.bukkit.entity.LivingEntity
|
||||||
|
|
||||||
|
class EntityProvidedHolder(
|
||||||
|
override val holder: Holder,
|
||||||
|
override val provider: LivingEntity
|
||||||
|
) : ProvidedHolder {
|
||||||
|
override fun equals(other: Any?): Boolean {
|
||||||
|
if (other !is EntityProvidedHolder) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
return other.holder == holder && other.provider == provider
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun hashCode(): Int {
|
||||||
|
var result = holder.hashCode()
|
||||||
|
result = 31 * result + provider.hashCode()
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -38,6 +38,7 @@ data class LocalBroadcast(
|
|||||||
|
|
||||||
if (radius < 0) {
|
if (radius < 0) {
|
||||||
for (message in toBroadcast) {
|
for (message in toBroadcast) {
|
||||||
|
@Suppress("DEPRECATION")
|
||||||
Bukkit.broadcastMessage(message)
|
Bukkit.broadcastMessage(message)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
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,21 +0,0 @@
|
|||||||
# Read more about chains: https://plugins.auxilor.io/effects/configuring-an-effect#effect-chains
|
|
||||||
|
|
||||||
chains:
|
|
||||||
- id: example_chain
|
|
||||||
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
|
|
||||||
pitch: 1.5
|
|
||||||
volume: 4
|
|
||||||
@@ -8,43 +8,3 @@ log-spawn-kill: true
|
|||||||
|
|
||||||
autospawn:
|
autospawn:
|
||||||
one-boss-per-world: true # If only one boss can auto-spawn per world at once.
|
one-boss-per-world: true # If only one boss can auto-spawn per world at once.
|
||||||
|
|
||||||
cooldown:
|
|
||||||
in-actionbar: true
|
|
||||||
sound:
|
|
||||||
enabled: true
|
|
||||||
sound: "BLOCK_NOTE_BLOCK_PLING"
|
|
||||||
pitch: 0.5
|
|
||||||
|
|
||||||
cannot-afford:
|
|
||||||
in-actionbar: true
|
|
||||||
sound:
|
|
||||||
enabled: true
|
|
||||||
sound: "BLOCK_NOTE_BLOCK_PLING"
|
|
||||||
pitch: 0.5
|
|
||||||
|
|
||||||
cannot-afford-type:
|
|
||||||
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 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
|
|
||||||
raytrace-distance: 80 # The distance that alt_click should check for a location
|
|
||||||
|
|
||||||
potions:
|
|
||||||
icon:
|
|
||||||
permanent: true
|
|
||||||
triggered: true
|
|
||||||
ambient:
|
|
||||||
permanent: false
|
|
||||||
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.
|
|
||||||
@@ -1,3 +1,8 @@
|
|||||||
resource-id: 525
|
environment:
|
||||||
bstats-id: 10635
|
- name: libreforge version
|
||||||
color: "&9"
|
value: ${libreforgeVersion}
|
||||||
|
|
||||||
|
options:
|
||||||
|
resource-id: 525
|
||||||
|
bstats-id: 10635
|
||||||
|
color: "&9"
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
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!"
|
||||||
|
|
||||||
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,9 +16,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!"
|
|
||||||
|
|
||||||
na: "N/A"
|
na: "N/A"
|
||||||
53
eco-core/core-plugin/src/main/resources/paper-plugin.yml
Normal file
53
eco-core/core-plugin/src/main/resources/paper-plugin.yml
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
name: ${pluginName}
|
||||||
|
version: ${version}
|
||||||
|
main: com.willfp.ecobosses.EcoBossesPlugin
|
||||||
|
api-version: 1.19
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
- name: eco
|
||||||
|
required: true
|
||||||
|
bootstrap: false
|
||||||
|
|
||||||
|
- name: libreforge
|
||||||
|
required: false
|
||||||
|
bootstrap: false
|
||||||
|
|
||||||
|
load-after:
|
||||||
|
- name: eco
|
||||||
|
bootstrap: false
|
||||||
|
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
ecobosses.*:
|
||||||
|
description: All ecobosses permissions
|
||||||
|
default: op
|
||||||
|
children:
|
||||||
|
ecobosses.command.*: true
|
||||||
|
ecobosses.command.*:
|
||||||
|
description: All ecobosses commands
|
||||||
|
default: op
|
||||||
|
children:
|
||||||
|
ecobosses.command.ecobosses: true
|
||||||
|
ecobosses.command.reload: true
|
||||||
|
ecobosses.command.spawn: true
|
||||||
|
ecobosses.command.give: true
|
||||||
|
|
||||||
|
ecobosses.command.ecobosses:
|
||||||
|
description: Allows the use of /ecobosses
|
||||||
|
default: true
|
||||||
|
|
||||||
|
ecobosses.command.give:
|
||||||
|
description: Allows the use of /ecobosses give
|
||||||
|
default: op
|
||||||
|
|
||||||
|
ecobosses.command.spawn:
|
||||||
|
description: Allows the use of /ecobosses spawn
|
||||||
|
default: op
|
||||||
|
|
||||||
|
ecobosses.command.killall:
|
||||||
|
description: Allows the use of /ecobosses killall
|
||||||
|
default: op
|
||||||
|
|
||||||
|
ecobosses.command.reload:
|
||||||
|
description: Allows the use of /ecobosses reload
|
||||||
|
default: op
|
||||||
@@ -1,27 +1,15 @@
|
|||||||
name: EcoBosses
|
name: ${pluginName}
|
||||||
version: ${projectVersion}
|
version: ${version}
|
||||||
main: com.willfp.ecobosses.EcoBossesPlugin
|
main: com.willfp.ecobosses.EcoBossesPlugin
|
||||||
api-version: 1.17
|
api-version: 1.17
|
||||||
authors: [Auxilor]
|
authors: [Auxilor]
|
||||||
website: willfp.com
|
website: willfp.com
|
||||||
load: STARTUP
|
|
||||||
depend:
|
depend:
|
||||||
- eco
|
- eco
|
||||||
softdepend:
|
softdepend:
|
||||||
|
- libreforge
|
||||||
- LevelledMobs
|
- LevelledMobs
|
||||||
- AureliumSkills
|
- AureliumSkills
|
||||||
- Jobs
|
|
||||||
- mcMMO
|
|
||||||
- Vault
|
|
||||||
- TMMobcoins
|
|
||||||
- EcoEnchants
|
|
||||||
- Talismans
|
|
||||||
- EcoArmor
|
|
||||||
- EcoItems
|
|
||||||
- EcoSkills
|
|
||||||
- Boosters
|
|
||||||
- ModelEngine
|
|
||||||
- EcoJobs
|
|
||||||
|
|
||||||
commands:
|
commands:
|
||||||
ecobosses:
|
ecobosses:
|
||||||
@@ -61,4 +49,4 @@ permissions:
|
|||||||
|
|
||||||
ecobosses.command.reload:
|
ecobosses.command.reload:
|
||||||
description: Allows the use of /ecobosses reload
|
description: Allows the use of /ecobosses reload
|
||||||
default: op
|
default: op
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#libreforge-updater
|
#libreforge-updater
|
||||||
#Fri Oct 07 19:51:54 BST 2022
|
#Thu Apr 13 12:48:51 AST 2023
|
||||||
version=8.96.0
|
kotlin.code.style=official
|
||||||
plugin-name=EcoBosses
|
libreforge-version=4.2.7
|
||||||
|
version=9.2.7
|
||||||
|
|||||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
pluginManagement {
|
|
||||||
repositories {
|
|
||||||
gradlePluginPortal()
|
|
||||||
maven { url "https://repo.jpenilla.xyz/snapshots/" }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
rootProject.name = 'EcoBosses'
|
|
||||||
|
|
||||||
// Core
|
|
||||||
include ':eco-core'
|
|
||||||
include ':eco-core:core-plugin'
|
|
||||||
14
settings.gradle.kts
Normal file
14
settings.gradle.kts
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
pluginManagement {
|
||||||
|
repositories {
|
||||||
|
gradlePluginPortal()
|
||||||
|
mavenLocal()
|
||||||
|
maven("https://repo.jpenilla.xyz/snapshots/")
|
||||||
|
maven("https://repo.auxilor.io/repository/maven-public/")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rootProject.name = "EcoBosses"
|
||||||
|
|
||||||
|
// Core
|
||||||
|
include(":eco-core")
|
||||||
|
include(":eco-core:core-plugin")
|
||||||
Reference in New Issue
Block a user