Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b862de2fdc |
1
.github/CODEOWNERS
vendored
1
.github/CODEOWNERS
vendored
@@ -1 +0,0 @@
|
|||||||
* @WillFP
|
|
||||||
@@ -3,7 +3,7 @@ version = rootProject.version
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly("io.papermc.paper:paper-api:1.19.3-R0.1-SNAPSHOT")
|
compileOnly("io.papermc.paper:paper-api:1.19.3-R0.1-SNAPSHOT")
|
||||||
compileOnly("com.ticxo.modelengine:api:R3.1.6")
|
compileOnly("com.ticxo.modelengine:api:R3.1.5")
|
||||||
compileOnly("com.github.ben-manes.caffeine:caffeine:3.0.2")
|
compileOnly("com.github.ben-manes.caffeine:caffeine:3.0.2")
|
||||||
|
|
||||||
implementation("com.willfp:ecomponent:1.3.0")
|
implementation("com.willfp:ecomponent:1.3.0")
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import com.willfp.eco.core.placeholder.PlayerPlaceholder
|
|||||||
import com.willfp.ecopets.commands.CommandEcoPets
|
import com.willfp.ecopets.commands.CommandEcoPets
|
||||||
import com.willfp.ecopets.commands.CommandPets
|
import com.willfp.ecopets.commands.CommandPets
|
||||||
import com.willfp.ecopets.libreforge.ConditionHasActivePet
|
import com.willfp.ecopets.libreforge.ConditionHasActivePet
|
||||||
import com.willfp.ecopets.libreforge.ConditionHasPet
|
|
||||||
import com.willfp.ecopets.libreforge.ConditionHasPetLevel
|
import com.willfp.ecopets.libreforge.ConditionHasPetLevel
|
||||||
import com.willfp.ecopets.libreforge.EffectGivePetXp
|
import com.willfp.ecopets.libreforge.EffectGivePetXp
|
||||||
import com.willfp.ecopets.libreforge.EffectPetXpMultiplier
|
import com.willfp.ecopets.libreforge.EffectPetXpMultiplier
|
||||||
@@ -20,7 +19,6 @@ import com.willfp.ecopets.pets.Pets
|
|||||||
import com.willfp.ecopets.pets.SpawnEggHandler
|
import com.willfp.ecopets.pets.SpawnEggHandler
|
||||||
import com.willfp.ecopets.pets.activePet
|
import com.willfp.ecopets.pets.activePet
|
||||||
import com.willfp.ecopets.pets.activePetLevel
|
import com.willfp.ecopets.pets.activePetLevel
|
||||||
import com.willfp.ecopets.pets.hasPet
|
|
||||||
import com.willfp.ecopets.pets.entity.ModelEnginePetEntity
|
import com.willfp.ecopets.pets.entity.ModelEnginePetEntity
|
||||||
import com.willfp.ecopets.pets.entity.PetEntity
|
import com.willfp.ecopets.pets.entity.PetEntity
|
||||||
import com.willfp.libreforge.SimpleProvidedHolder
|
import com.willfp.libreforge.SimpleProvidedHolder
|
||||||
@@ -49,7 +47,6 @@ class EcoPetsPlugin : LibreforgePlugin() {
|
|||||||
override fun handleEnable() {
|
override fun handleEnable() {
|
||||||
Conditions.register(ConditionHasPetLevel)
|
Conditions.register(ConditionHasPetLevel)
|
||||||
Conditions.register(ConditionHasActivePet)
|
Conditions.register(ConditionHasActivePet)
|
||||||
Conditions.register(ConditionHasPet)
|
|
||||||
Effects.register(EffectPetXpMultiplier)
|
Effects.register(EffectPetXpMultiplier)
|
||||||
Effects.register(EffectGivePetXp)
|
Effects.register(EffectGivePetXp)
|
||||||
Triggers.register(TriggerGainPetXp)
|
Triggers.register(TriggerGainPetXp)
|
||||||
@@ -71,18 +68,6 @@ class EcoPetsPlugin : LibreforgePlugin() {
|
|||||||
this,
|
this,
|
||||||
"pet_id"
|
"pet_id"
|
||||||
) { it.activePet?.id ?: "" }.register()
|
) { it.activePet?.id ?: "" }.register()
|
||||||
|
|
||||||
PlayerPlaceholder(
|
|
||||||
this,
|
|
||||||
"total_pets"
|
|
||||||
) {
|
|
||||||
var pets = 0
|
|
||||||
for (pet in Pets.values()) {
|
|
||||||
if (it.hasPet(pet))
|
|
||||||
pets++
|
|
||||||
}
|
|
||||||
pets.toString()
|
|
||||||
}.register()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun handleReload() {
|
override fun handleReload() {
|
||||||
|
|||||||
@@ -14,10 +14,9 @@ object ConditionHasActivePet : Condition<NoCompileData>("has_active_pet") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun isMet(player: Player, config: Config, compileData: NoCompileData): Boolean {
|
override fun isMet(player: Player, config: Config, compileData: NoCompileData): Boolean {
|
||||||
return EcoPetsAPI.instance.getActivePet(player) == Pets.getByID(config.getString("pet").lowercase())
|
return EcoPetsAPI.instance.hasPet(
|
||||||
// return EcoPetsAPI.instance.hasPet(
|
player,
|
||||||
// player,
|
Pets.getByID(config.getString("pet").lowercase()) ?: return false
|
||||||
// Pets.getByID(config.getString("pet").lowercase()) ?: return false
|
)
|
||||||
// )
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
package com.willfp.ecopets.libreforge
|
|
||||||
|
|
||||||
import com.willfp.eco.core.config.interfaces.Config
|
|
||||||
import com.willfp.ecopets.api.EcoPetsAPI
|
|
||||||
import com.willfp.ecopets.pets.Pets
|
|
||||||
import com.willfp.libreforge.NoCompileData
|
|
||||||
import com.willfp.libreforge.conditions.Condition
|
|
||||||
import org.bukkit.entity.Player
|
|
||||||
|
|
||||||
object ConditionHasPet : Condition<NoCompileData>("has_pet") {
|
|
||||||
override fun isMet(player: Player, config: Config, compileData: NoCompileData): Boolean {
|
|
||||||
return EcoPetsAPI.instance.hasPet(
|
|
||||||
player,
|
|
||||||
Pets.getByID(config.getString("pet").lowercase()) ?: return false
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -68,14 +68,14 @@ permissions:
|
|||||||
default: true
|
default: true
|
||||||
|
|
||||||
ecopets.xpmultiplier.50percent:
|
ecopets.xpmultiplier.50percent:
|
||||||
description: Gives the player 50% more skill experience
|
description: Gives the player 50% more pet experience
|
||||||
default: false
|
default: false
|
||||||
ecopets.xpmultiplier.double:
|
ecopets.xpmultiplier.double:
|
||||||
description: Gives the player 2x skill experience
|
description: Gives the player 2x pet experience
|
||||||
default: false
|
default: false
|
||||||
ecopets.xpmultiplier.triple:
|
ecopets.xpmultiplier.triple:
|
||||||
description: Gives the player 3x skill experience
|
description: Gives the player 3x pet experience
|
||||||
default: false
|
default: false
|
||||||
ecopets.xpmultiplier.quadruple:
|
ecopets.xpmultiplier.quadruple:
|
||||||
description: Gives the player 4x skill experience
|
description: Gives the player 4x pet experience
|
||||||
default: false
|
default: false
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#libreforge-updater
|
#libreforge-updater
|
||||||
#Sun Jul 23 11:40:37 BST 2023
|
#Sat Jun 10 13:32:44 BST 2023
|
||||||
kotlin.code.style=official
|
kotlin.code.style=official
|
||||||
libreforge-version=4.25.2
|
libreforge-version=4.19.0
|
||||||
version=2.24.2
|
version=2.18.0
|
||||||
|
|||||||
Reference in New Issue
Block a user