diff --git a/README.md b/README.md index fa860b7b..40dd4a15 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,8 @@ # Psychics (paper 기반의 능력자 플러그인) -[![Kotlin](https://img.shields.io/badge/java-16.0.2-ED8B00.svg?logo=java)](https://www.azul.com/) -[![Kotlin](https://img.shields.io/badge/kotlin-1.5.21-585DEF.svg?logo=kotlin)](http://kotlinlang.org) -[![Gradle](https://img.shields.io/badge/gradle-7.2-02303A.svg?logo=gradle)](https://gradle.org) -[![Maven Central](https://img.shields.io/maven-central/v/io.github.monun/psychics)](https://search.maven.org/artifact/io.github.monun/psychics) +[![Kotlin](https://img.shields.io/badge/java-17-ED8B00.svg?logo=java)](https://www.azul.com/) +[![Kotlin](https://img.shields.io/badge/kotlin-1.7.21-585DEF.svg?logo=kotlin)](http://kotlinlang.org) +[![Gradle](https://img.shields.io/badge/gradle-7.6-02303A.svg?logo=gradle)](https://gradle.org) [![GitHub](https://img.shields.io/github/license/monun/psychics)](https://www.gnu.org/licenses/gpl-3.0.html) [![Kotlin](https://img.shields.io/badge/youtube-각별-red.svg?logo=youtube)](https://www.youtube.com/channel/UCDrAR1OWC2MD4s0JLetN0MA) @@ -11,4 +10,9 @@ 현재 개발 진행중으로 배포버전이 없습니다. -* [docs](https://monun.github.io/psychics/) \ No newline at end of file +* [docs](https://monun.github.io/psychics/) + +--- +## TODO + +* [x] Show Firework without Tap Effect Util \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 1a94f81a..0f7de69f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,10 +1,10 @@ plugins { - kotlin("jvm") version "1.5.21" + kotlin("jvm") version "1.7.21" } java { toolchain { - languageVersion.set(JavaLanguageVersion.of(16)) + languageVersion.set(JavaLanguageVersion.of(17)) } } @@ -12,14 +12,6 @@ allprojects { repositories { mavenCentral() } - - tasks { - withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class) { - kotlinOptions { - jvmTarget = "16" - } - } - } } subprojects { @@ -30,15 +22,11 @@ subprojects { } dependencies { - compileOnly("io.papermc.paper:paper-api:1.17.1-R0.1-SNAPSHOT") + compileOnly("io.papermc.paper:paper-api:1.20.1-R0.1-SNAPSHOT") implementation(kotlin("stdlib")) implementation(kotlin("reflect")) - implementation("io.github.monun:tap-api:4.1.9") - - testImplementation("org.junit.jupiter:junit-jupiter-api:5.7.2") - testImplementation("org.junit.jupiter:junit-jupiter-engine:5.7.2") - testImplementation("org.mockito:mockito-core:3.6.28") + implementation("io.github.monun:tap-api:4.9.8") } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ffed3a25..070cb702 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/psychics-abilities/ability-berserker/src/main/kotlin/io/github/monun/psychics/ability/berserker/AbilityBerserker.kt b/psychics-abilities/ability-berserker/src/main/kotlin/io/github/monun/psychics/ability/berserker/AbilityBerserker.kt index 70768d34..04f00abc 100644 --- a/psychics-abilities/ability-berserker/src/main/kotlin/io/github/monun/psychics/ability/berserker/AbilityBerserker.kt +++ b/psychics-abilities/ability-berserker/src/main/kotlin/io/github/monun/psychics/ability/berserker/AbilityBerserker.kt @@ -2,9 +2,10 @@ package io.github.monun.psychics.ability.berserker import io.github.monun.psychics.AbilityConcept import io.github.monun.psychics.ActiveAbility +import io.github.monun.psychics.effect.spawnFirework import io.github.monun.tap.config.Config import io.github.monun.tap.config.Name -import io.github.monun.tap.effect.playFirework +//import io.github.monun.tap.effect.playFirework import org.bukkit.* import org.bukkit.event.EventHandler import org.bukkit.event.Listener @@ -64,7 +65,7 @@ class AbilityBerserker : ActiveAbility(), Listener { val location = player.location.apply { y += 2.0 } val world = location.world val firework = FireworkEffect.builder().with(FireworkEffect.Type.BURST).withColor(Color.RED).withFlicker().build() - world.playFirework(location, firework) + world.spawnFirework(location, firework, psychic.plugin) } @EventHandler(ignoreCancelled = true) diff --git a/psychics-abilities/ability-bomber/src/main/kotlin/io/github/monun/psychics/ability/bomber/AbilityBomber.kt b/psychics-abilities/ability-bomber/src/main/kotlin/io/github/monun/psychics/ability/bomber/AbilityBomber.kt index fe800d60..01d84d10 100644 --- a/psychics-abilities/ability-bomber/src/main/kotlin/io/github/monun/psychics/ability/bomber/AbilityBomber.kt +++ b/psychics-abilities/ability-bomber/src/main/kotlin/io/github/monun/psychics/ability/bomber/AbilityBomber.kt @@ -170,19 +170,19 @@ class AbilityBomber : ActiveAbility(), Listener { * 가짜 TNT 효과 */ inner class TNT(location: Location) { - private val stand: FakeEntity - private val tnt: FakeEntity + private val stand: FakeEntity + private val tnt: FakeEntity init { val psychic = psychic stand = psychic.spawnFakeEntity(location, ArmorStand::class.java).apply { - updateMetadata { + updateMetadata { isMarker = true isInvisible = true } } tnt = psychic.spawnFakeEntity(location, TNTPrimed::class.java).apply { - updateMetadata { + updateMetadata { fuseTicks = (durationTime / 50L).toInt() } } diff --git a/psychics-abilities/ability-fangs/src/main/kotlin/io/github/monun/psychics/ability/fangs/AbilityFangs.kt b/psychics-abilities/ability-fangs/src/main/kotlin/io/github/monun/psychics/ability/fangs/AbilityFangs.kt index aa9c0a50..f0944362 100644 --- a/psychics-abilities/ability-fangs/src/main/kotlin/io/github/monun/psychics/ability/fangs/AbilityFangs.kt +++ b/psychics-abilities/ability-fangs/src/main/kotlin/io/github/monun/psychics/ability/fangs/AbilityFangs.kt @@ -134,7 +134,7 @@ class AbilityFangs : ActiveAbility(), Listener { private class Fang( val location: Location, - val fakeEntity: FakeEntity, + val fakeEntity: FakeEntity, var nextRunTime: Long, val damaged: MutableSet ) : Comparable { diff --git a/psychics-abilities/ability-magic-archery/src/main/kotlin/io/github/monun/psychics/ability/magicarchery/AbilityMagicArchery.kt b/psychics-abilities/ability-magic-archery/src/main/kotlin/io/github/monun/psychics/ability/magicarchery/AbilityMagicArchery.kt index 2c2f5b7d..cd94a44a 100644 --- a/psychics-abilities/ability-magic-archery/src/main/kotlin/io/github/monun/psychics/ability/magicarchery/AbilityMagicArchery.kt +++ b/psychics-abilities/ability-magic-archery/src/main/kotlin/io/github/monun/psychics/ability/magicarchery/AbilityMagicArchery.kt @@ -7,9 +7,10 @@ import io.github.monun.psychics.attribute.EsperAttribute import io.github.monun.psychics.damage.Damage import io.github.monun.psychics.damage.DamageType import io.github.monun.psychics.damage.psychicDamage +import io.github.monun.psychics.effect.spawnFirework import io.github.monun.psychics.util.TargetFilter import io.github.monun.tap.config.Name -import io.github.monun.tap.effect.playFirework +//import io.github.monun.tap.effect.playFirework import io.github.monun.tap.trail.TrailSupport import net.kyori.adventure.text.Component.text import net.kyori.adventure.text.format.NamedTextColor @@ -132,7 +133,7 @@ class AbilityMagicArchery : Ability(), Listener { val box = target.boundingBox val effect = FireworkEffect.builder().with(FireworkEffect.Type.BURST) .withColor(if (force == 1.0F) Color.RED else Color.ORANGE).build() - world.playFirework(box.centerX, box.maxY + 0.5, box.centerZ, effect) + world.spawnFirework(box.centerX, box.maxY + 0.5, box.centerZ, effect, psychic.plugin) } } diff --git a/psychics-abilities/ability-sample/src/main/kotlin/io/github/monun/psychics/ability/sample/AbilitySample.kt b/psychics-abilities/ability-sample/src/main/kotlin/io/github/monun/psychics/ability/sample/AbilitySample.kt index 9ad83d7a..d170a4ba 100644 --- a/psychics-abilities/ability-sample/src/main/kotlin/io/github/monun/psychics/ability/sample/AbilitySample.kt +++ b/psychics-abilities/ability-sample/src/main/kotlin/io/github/monun/psychics/ability/sample/AbilitySample.kt @@ -6,9 +6,10 @@ import io.github.monun.psychics.Channel import io.github.monun.psychics.attribute.EsperAttribute import io.github.monun.psychics.damage.Damage import io.github.monun.psychics.damage.DamageType +import io.github.monun.psychics.effect.spawnFirework import io.github.monun.psychics.util.hostileFilter import io.github.monun.tap.config.Name -import io.github.monun.tap.effect.playFirework +//import io.github.monun.tap.effect.playFirework import net.kyori.adventure.text.Component.text import org.bukkit.* import org.bukkit.entity.LivingEntity @@ -35,10 +36,6 @@ class AbilityConceptSample : AbilityConcept() { class AbilitySample : ActiveAbility(), Listener { companion object { private val effect = FireworkEffect.builder().with(FireworkEffect.Type.BURST).withColor(Color.RED).build() - - private fun LivingEntity.playPsychicEffect() { - world.playFirework(location, effect) - } } override fun onInitialize() { @@ -85,4 +82,8 @@ class AbilitySample : ActiveAbility(), Listener { target.psychicDamage() target.playPsychicEffect() } + + private fun LivingEntity.playPsychicEffect() { + world.spawnFirework(location, effect, psychic.plugin) + } } \ No newline at end of file diff --git a/psychics-abilities/ability-sling-shot/src/main/kotlin/io/github/monun/psychics/ability/slingshot/AbilitySlingShot.kt b/psychics-abilities/ability-sling-shot/src/main/kotlin/io/github/monun/psychics/ability/slingshot/AbilitySlingShot.kt index baab00fa..f70e2bca 100644 --- a/psychics-abilities/ability-sling-shot/src/main/kotlin/io/github/monun/psychics/ability/slingshot/AbilitySlingShot.kt +++ b/psychics-abilities/ability-sling-shot/src/main/kotlin/io/github/monun/psychics/ability/slingshot/AbilitySlingShot.kt @@ -76,7 +76,7 @@ class AbilitySlingShot : Ability(), Listener { val projectile = CobblestoneProjectile().apply { cobblestone = this@AbilitySlingShot.psychic.spawnFakeEntity(location, ArmorStand::class.java).apply { - updateMetadata { + updateMetadata { isVisible = false isMarker = true } @@ -97,7 +97,7 @@ class AbilitySlingShot : Ability(), Listener { } inner class CobblestoneProjectile : PsychicProjectile(1200, concept.range) { - lateinit var cobblestone: FakeEntity + lateinit var cobblestone: FakeEntity override fun onPreUpdate() { velocity = velocity.apply { y -= concept.stoneGravity } diff --git a/psychics-abilities/ability-storm-breaker/src/main/kotlin/io/github/monun/psychics/ability/stormbreaker/AbilityStormBreaker.kt b/psychics-abilities/ability-storm-breaker/src/main/kotlin/io/github/monun/psychics/ability/stormbreaker/AbilityStormBreaker.kt index 50f5f188..313c25ee 100644 --- a/psychics-abilities/ability-storm-breaker/src/main/kotlin/io/github/monun/psychics/ability/stormbreaker/AbilityStormBreaker.kt +++ b/psychics-abilities/ability-storm-breaker/src/main/kotlin/io/github/monun/psychics/ability/stormbreaker/AbilityStormBreaker.kt @@ -14,7 +14,6 @@ import io.github.monun.tap.config.Name import io.github.monun.tap.fake.FakeEntity import io.github.monun.tap.fake.Movement import io.github.monun.tap.fake.Trail -import io.github.monun.tap.fake.invisible import io.github.monun.tap.math.normalizeAndLength import io.github.monun.tap.math.toRadians import io.github.monun.tap.trail.TrailSupport @@ -109,7 +108,7 @@ class AbilityConceptStormBreaker : AbilityConcept() { } class AbilityStormBreaker : Ability() { - private var hittedAxe: FakeEntity? = null + private var hittedAxe: FakeEntity? = null override fun onEnable() { psychic.registerEvents(AxeListener()) @@ -207,9 +206,9 @@ class AbilityStormBreaker : Ability() { ).apply { velocity = location.direction.multiply(concept.axeSpeed) - updateMetadata { + updateMetadata { isMarker = true - invisible = true + isVisible = false } updateEquipment { helmet = item.clone() @@ -229,7 +228,7 @@ class AbilityStormBreaker : Ability() { inner class AxeProjectile( private val damage: Damage, private val item: ItemStack ) : PsychicProjectile(1200, concept.range) { - var axe: FakeEntity? = null + var axe: FakeEntity? = null override fun onPreUpdate() { velocity = velocity.apply { y -= concept.axeGravity } @@ -239,7 +238,7 @@ class AbilityStormBreaker : Ability() { val to = movement.to axe?.let { axe -> axe.moveTo(to.clone().apply { y -= 1.62; yaw -= 90.0F }) - axe.updateMetadata { + axe.updateMetadata { headPose = EulerAngle(0.0, 0.0, ticks * -0.5) } } @@ -273,7 +272,7 @@ class AbilityStormBreaker : Ability() { axe?.let { axe -> this.axe = null axe.moveTo(hitLocation.clone().apply { y -= 0.5; yaw = from.yaw - 90.0F }) - axe.updateMetadata { + axe.updateMetadata { headPose = EulerAngle(0.0, 0.0, (-180.0).toRadians()) } hittedAxe = axe diff --git a/psychics-abilities/build.gradle.kts b/psychics-abilities/build.gradle.kts index 84acff18..d80b4224 100644 --- a/psychics-abilities/build.gradle.kts +++ b/psychics-abilities/build.gradle.kts @@ -49,8 +49,21 @@ subprojects { } gradle.buildFinished { - val libs = File(buildDir, "libs") + if (!buildDir.exists()) buildDir.mkdir() - if (libs.exists()) - zipTo(File(buildDir, "abilities.zip"), libs) + val abilitiesDir = File(buildDir,"abilities") + abilitiesDir.mkdir() + + subprojects + .map { File(it.buildDir, "libs") to it } + .filter { (it,_) -> it.exists() } + .mapNotNull { (it,project) -> it.listFiles()!!.find { + it.nameWithoutExtension == "${project.group}.${project.name.removePrefix("ability-")}" + } } + .forEach { + val newFile = File(abilitiesDir,it.name) + it.copyTo(newFile,true) + } + + zipTo(File(buildDir, "abilities.zip"), abilitiesDir) } \ No newline at end of file diff --git a/psychics-core/build.gradle.kts b/psychics-core/build.gradle.kts index 271aebd0..530e5dae 100644 --- a/psychics-core/build.gradle.kts +++ b/psychics-core/build.gradle.kts @@ -1,10 +1,10 @@ plugins { - id("org.jetbrains.dokka") version "1.5.0" + id("org.jetbrains.dokka") version "1.7.20" } dependencies { - implementation("io.github.monun:kommand-api:2.6.6") - implementation("io.github.monun:invfx-api:3.0.1") + implementation("io.github.monun:kommand-api:3.1.7") + implementation("io.github.monun:invfx-api:3.3.2") } tasks { diff --git a/psychics-core/src/main/kotlin/io/github/monun/psychics/Psychic.kt b/psychics-core/src/main/kotlin/io/github/monun/psychics/Psychic.kt index 0f5bc059..47e10727 100644 --- a/psychics-core/src/main/kotlin/io/github/monun/psychics/Psychic.kt +++ b/psychics-core/src/main/kotlin/io/github/monun/psychics/Psychic.kt @@ -38,6 +38,8 @@ import org.bukkit.boss.BossBar import org.bukkit.configuration.ConfigurationSection import org.bukkit.entity.ArmorStand import org.bukkit.entity.Entity +import org.bukkit.entity.FallingBlock +import org.bukkit.entity.Item import org.bukkit.event.Listener import org.bukkit.event.player.PlayerEvent import org.bukkit.inventory.ItemStack @@ -132,7 +134,7 @@ class Psychic internal constructor( private lateinit var listeners: ArrayList - private lateinit var fakeEntities: MutableSet + private lateinit var fakeEntities: MutableSet> private var prevUpdateTime = 0L @@ -166,7 +168,7 @@ class Psychic internal constructor( ticker = Ticker.precision() projectiles = FakeProjectileManager() listeners = arrayListOf() - fakeEntities = Collections.newSetFromMap(WeakHashMap()) + fakeEntities = Collections.newSetFromMap(WeakHashMap()) if (concept.mana > 0.0) { manaBar = Bukkit.createBossBar(null, concept.manaColor, BarStyle.SEGMENTED_10).apply { @@ -360,7 +362,7 @@ class Psychic internal constructor( * @exception IllegalArgumentException 유효하지 않은 객체일때 발생 * @exception IllegalArgumentException 활성화되지 않은 객체일때 발생 */ - fun spawnFakeEntity(location: Location, entityClass: Class): FakeEntity { + fun spawnFakeEntity(location: Location, entityClass: Class): FakeEntity { checkState() checkEnabled() @@ -378,7 +380,7 @@ class Psychic internal constructor( * @exception IllegalArgumentException 유효하지 않은 객체일때 발생 * @exception IllegalArgumentException 활성화되지 않은 객체일때 발생 */ - fun spawnFakeFallingBlock(location: Location, blockData: BlockData): FakeEntity { + fun spawnFakeFallingBlock(location: Location, blockData: BlockData): FakeEntity { checkState() checkEnabled() @@ -396,7 +398,7 @@ class Psychic internal constructor( * @exception IllegalArgumentException 유효하지 않은 객체일때 발생 * @exception IllegalArgumentException 활성화되지 않은 객체일때 발생 */ - fun spawnItem(location: Location, itemStack: ItemStack): FakeEntity { + fun spawnItem(location: Location, itemStack: ItemStack): FakeEntity { checkState() checkEnabled() @@ -414,9 +416,9 @@ class Psychic internal constructor( * @exception IllegalArgumentException 유효하지 않은 객체일때 발생 * @exception IllegalArgumentException 활성화되지 않은 객체일때 발생 */ - fun spawnMarker(location: Location): FakeEntity { + fun spawnMarker(location: Location): FakeEntity { return spawnFakeEntity(location, ArmorStand::class.java).apply { - updateMetadata { + updateMetadata { isMarker = true isInvisible = true } @@ -431,7 +433,7 @@ class Psychic internal constructor( * @exception IllegalArgumentException 유효하지 않은 객체일때 발생 * @exception IllegalArgumentException 활성화되지 않은 객체일때 발생 */ - fun marker(passenger: FakeEntity): FakeEntity { + fun marker(passenger: FakeEntity): FakeEntity { return spawnMarker(passenger.location).apply { addPassenger(passenger) } } diff --git a/psychics-core/src/main/kotlin/io/github/monun/psychics/command/KommandPsychics.kt b/psychics-core/src/main/kotlin/io/github/monun/psychics/command/KommandPsychics.kt index 6b636270..88f1b1e9 100644 --- a/psychics-core/src/main/kotlin/io/github/monun/psychics/command/KommandPsychics.kt +++ b/psychics-core/src/main/kotlin/io/github/monun/psychics/command/KommandPsychics.kt @@ -43,7 +43,9 @@ internal object KommandPsychics { this.manager = manager kommand.register("psychics", "psy") { - permission("psychics.commands") + requires { + hasPermission("psychics.commands") + } val psychicConceptArgument = dynamic { _, input -> manager.getPsychicConcept(input) diff --git a/psychics-core/src/main/kotlin/io/github/monun/psychics/effect/FireworkSupport.kt b/psychics-core/src/main/kotlin/io/github/monun/psychics/effect/FireworkSupport.kt new file mode 100644 index 00000000..63f02d00 --- /dev/null +++ b/psychics-core/src/main/kotlin/io/github/monun/psychics/effect/FireworkSupport.kt @@ -0,0 +1,40 @@ +package io.github.monun.psychics.effect + +import org.bukkit.FireworkEffect +import org.bukkit.Location +import org.bukkit.World +import org.bukkit.plugin.Plugin +import org.bukkit.entity.Firework +import org.bukkit.inventory.meta.FireworkMeta +import org.bukkit.metadata.FixedMetadataValue + +fun World.spawnFirework( + x: Double, y: Double, z: Double, effect: FireworkEffect, plugin: Plugin, + hasDamage: Boolean = false, power: Int = 0, ticksToDetonate: Int = 0 +): Firework { + val location = Location(this, x, y, z) + val firework: Firework = location.world.spawn(location, Firework::class.java) + val fireworkMeta: FireworkMeta = firework.fireworkMeta + fireworkMeta.addEffect(effect) + fireworkMeta.power = power + firework.fireworkMeta = fireworkMeta + firework.ticksToDetonate = ticksToDetonate + if (!hasDamage) { + firework.disableDamage(plugin) + } + return firework +} +fun World.spawnFirework( + loc: Location, + effect: FireworkEffect, plugin: Plugin, + hasDamage: Boolean = false, power: Int = 0, ticksToDetonate: Int = 0 +) = + spawnFirework(loc.x, loc.y, loc.z, effect, plugin, hasDamage, power, ticksToDetonate) + +val NO_DAMAGE_FIREWORK_FLAG = "NoDamageFirework" + +fun Firework.disableDamage(plugin: Plugin) { + setMetadata(NO_DAMAGE_FIREWORK_FLAG, FixedMetadataValue(plugin, true)) +} + + diff --git a/psychics-core/src/main/kotlin/io/github/monun/psychics/plugin/EventListener.kt b/psychics-core/src/main/kotlin/io/github/monun/psychics/plugin/EventListener.kt index 97a0a76c..0988e758 100644 --- a/psychics-core/src/main/kotlin/io/github/monun/psychics/plugin/EventListener.kt +++ b/psychics-core/src/main/kotlin/io/github/monun/psychics/plugin/EventListener.kt @@ -20,6 +20,7 @@ package io.github.monun.psychics.plugin import com.destroystokyo.paper.event.inventory.PrepareResultEvent import com.destroystokyo.paper.event.player.PlayerPostRespawnEvent import io.github.monun.psychics.* +import io.github.monun.psychics.effect.NO_DAMAGE_FIREWORK_FLAG import io.github.monun.psychics.item.enchantability import io.github.monun.psychics.item.isPsychicbound import io.github.monun.psychics.item.psionicsLevel @@ -27,11 +28,14 @@ import io.github.monun.psychics.item.removeAllPsychicbounds import io.github.monun.tap.fake.FakeEntityServer import org.bukkit.GameMode import org.bukkit.Material +import org.bukkit.entity.Firework import org.bukkit.entity.Player import org.bukkit.event.EventHandler import org.bukkit.event.Listener import org.bukkit.event.block.Action import org.bukkit.event.enchantment.EnchantItemEvent +import org.bukkit.event.entity.EntityDamageByEntityEvent +import org.bukkit.event.entity.EntityDamageEvent import org.bukkit.event.entity.EntityRegainHealthEvent import org.bukkit.event.entity.ItemSpawnEvent import org.bukkit.event.inventory.InventoryClickEvent @@ -198,6 +202,21 @@ class EventListener( } } + + @EventHandler + fun onEntityDamageByEntity(event: EntityDamageByEntityEvent) { + val damager = event.damager + val cause = event.cause + if ( + damager is Firework && + cause == EntityDamageEvent.DamageCause.ENTITY_EXPLOSION && + damager.hasMetadata(NO_DAMAGE_FIREWORK_FLAG) + ) { + event.isCancelled = true + } + } + + private val Player.esper: Esper get() = requireNotNull(psychicManager.getEsper(this)) } diff --git a/psychics-core/src/main/resources/plugin.yml b/psychics-core/src/main/resources/plugin.yml index 571e4270..a911c731 100644 --- a/psychics-core/src/main/resources/plugin.yml +++ b/psychics-core/src/main/resources/plugin.yml @@ -1,9 +1,9 @@ name: Psychics main: io.github.monun.psychics.plugin.PsychicsPlugin -api-version: '1.17' +api-version: '1.20' version: $version author: Monun libraries: - - io.github.monun:tap:4.1.9 - - io.github.monun:invfx:3.0.1 - - io.github.monun:kommand:2.6.6 + - io.github.monun:tap-core:4.9.8 + - io.github.monun:invfx-core:3.3.2 + - io.github.monun:kommand-core:3.1.7