amblerberry

Build a minecraft paper 1.21.11 plugin that has this

Sand Relic: fling players back 10 blocks away and 3 blocks high and blindness effect on players in a 5 block radius, 2 minute cool down. Deals 1 heart

Warden Relic: Gives player using relic slowness 3 for 5 seconds that charges up ability to use warden beam, blindness goes to players in 10 block radius and deals 5 hearts damage. Cool down for 7 minutes.

Ocean Relic: Water breathing (permanently), shoots players up into the air 10 blocks in a 6 block radius with a water particle underneath them when they fling up. This deals 3 hearts with just the fling then adds fall damage. 2 and a half minute cooldown.

Wind Relic: immune to fall damage, Fling players backwards 10 blocks. Deals 1 and a half heart damage. 2 minute cooldown.

Flame Relic: Throws ghast fireball that does 4 heart damage and does lingering fire damage. Give player perm fire resistance. 5 minute cooldown on fireball.

Special Event Relic: ONLY OBTAINABLE FROM EVENTS!! (Only available to get with a command) Dash’s 15 blocks, summons lightning bolt on player that deals 6 heart damage and lingering fire damage. Cool down 5 minutes on lightning bolt and 1 minute on dash.

Fortune Power Relic: hero of the village 2, speed 2 for 30 seconds. 2 minute cooldown.

Kodari AI
KodariJul 27 at 12:47 pm 5

I’ll create a relic-based ability plugin for Paper 1.21.1.

RelicPlugin
A Paper 1.21.1 plugin adding 7 unique relics with distinct abilities. Includes Sand Relic (fling+blindness), Warden Relic (sonic beam charge-up), Ocean Relic (water breathing+launch), Wind Relic (fall immunity+fling), Flame Relic (fireball+fire resist), Special Event Relic (dash+lightning), and Fortune Power Relic (hero+speed). Features cooldown management, permanent passive effects, and admin commands.
amblerberry

The compilation failed with this error:

code
[ERROR] Kotlin compilation failed
src/main/kotlin/com/relics/CooldownManager.kt:6:7: error: redeclaration:
src/main/kotlin/com/relics/listeners/RelicListener.kt:25:27: error: unresolved reference 'WindRelic'.
src/main/kotlin/com/relics/relics/FlameRelic.kt:15:18: error: return type of 'fun activate(player: Player): Unit' is not a subtype of the return type of the overridden member 'fun activate(player: Player): Boolean' defined in 'com.relics.RelicAbility'.
src/main/kotlin/com/relics/relics/FortunePowerRelic.kt:14:18: error: return type of 'fun activate(player: Player): Unit' is not a subtype of the return type of the overridden member 'fun activate(player: Player): Boolean' defined in 'com.relics.RelicAbility'.
src/main/kotlin/com/relics/relics/OceanRelic.kt:13:18: error: return type of 'fun activate(player: Player): Unit' is not a subtype of the return type of the overridden member 'fun activate(player: Player): Boolean' defined in 'com.relics.RelicAbility'.
src/main/kotlin/com/relics/relics/SandRelic.kt:14:18: error: return type of 'fun activate(player: Player): Unit' is not a subtype of the return type of the overridden member 'fun activate(player: Player): Boolean' defined in 'com.relics.RelicAbility'.
src/main/kotlin/com/relics/relics/SpecialEventRelic.kt:12:18: error: return type of 'fun activate(player: Player): Unit' is not a subtype of the return type of the overridden member 'fun activate(player: Player): Boolean' defined in 'com.relics.RelicAbility'.
src/main/kotlin/com/relics/relics/WardenRelic.kt:16:18: error: return type of 'fun activate(player: Player): Unit' is not a subtype of the return type of the overridden member 'fun activate(player: Player): Boolean' defined in 'com.relics.RelicAbility'.
src/main/kotlin/com/relics/relics/WindRelic.kt:6:7: error: redeclaration:

Please fix this error by creating a new artifact with the corrected code.

Kodari AI
KodariJul 28 at 1:34 am 4

Plan:

  1. Inspect the shared ability/cooldown types and all affected relic implementations.

  2. Correct the duplicate declarations, missing WindRelic class, and Boolean return contracts.

  3. Re-emit the corrected source artifact without changing unrelated behavior.

  1. Fixed the duplicate CooldownManager declaration by replacing the corrupted WindRelic.kt with the correct WindRelic implementation.

  2. Updated all relic activate methods to return the required Boolean value.

  3. Added return true after successful activations.

  4. Preserved cooldown behavior and the existing relic abilities.

amblerberry

I Want you to add Satisfying effects to every relic and fix the cooldown applying even though its saying no player target and make every relic an echo shard

Kodari AI
KodariJul 28 at 1:53 am 7
  1. Add satisfying visual/audio effects to each relic ability.

  2. Fix target validation so cooldowns are only consumed when a valid player target is affected.

  3. Make every relic item use an echo shard while preserving relic identification.

  1. Changed all relics to use Material.ECHO_SHARD while retaining their unique persistent relic IDs and descriptions.

  2. Fixed cooldown consumption:

    • Sand, Wind, and Ocean relics return failure when no nearby player is affected.

    • Warden relic requires nearby players before charging.

    • Special Event lightning only consumes cooldown when it successfully finds a player target.

  3. Added enhanced visual and audio effects to every relic, including particles, sounds, flashes, sonic effects, fire, water, wind, and totem effects.

amblerberry

Can you make wind relic fling the player that used wind relic 5 to 10 blocks into the air and when they land theres gonna be a smash or smoke effect below them and make sure to activate teh ability the player must do shift + f and also can you make relic abilities also work on mobs and add these secondary abilities you can activate them by doing shift + f 🌊 Ocean Relic

Passive: Water Breathing

Main: Water Geyser (current fling ability)

Secondary: Tidal Prison

Traps nearby enemies in a sphere of water for 3 seconds.

Gives Mining Fatigue II and Slowness II.

Cooldown: 90s

Alternative:

Dolphin Rush: Speed III for 10 seconds.

🔥 Flame Relic

Passive: Fire Resistance

Main: Fireball

Secondary: Flame Dash

Dash forward.

Leaves a trail of fire behind.

Sets hit players on fire.

Cooldown: 60s

Alternative:

Inferno Ring

Summons a circle of flames around the player.

Burns enemies within 5 blocks.

🏜️ Sand Relic

Main: Sand Burst

Secondary: Sand Tomb

Traps a target in a sand cage for 4 seconds.

Prevents sprinting.

Cooldown: 90s

Alternative:

Sandstorm

Creates a cloud of particles.

Nearby enemies get Blindness II.

👁️ Warden Relic

Main: Sonic Boom

Secondary: Darkness Pulse

Gives Darkness and Blindness to players in a 12-block radius.

Cooldown: 2 minutes

Alternative:

Warden Charge

Gain Resistance II and Speed I for 8 seconds.

🍀 Fortune Power Relic

Main: Hero of the Village + Speed

Secondary: Lucky Strike

For 15 seconds:

Extra drops from mobs.

20% chance to deal double damage.

Cooldown: 2 minutes

Alternative:

Fortune Surge

Gives Haste III and Speed II.

⭐ Special Event Relic

Main: Lightning

Secondary: Dash

Third Ability (Shift + Swap Hand)

Starfall

Summons 5 lightning bolts randomly around a target area

cooldown:10 minutes

Kodari AI
KodariJul 28 at 2:08 am 23
  1. Update activation input and target handling so relic abilities use Shift + F and affect mobs as well as players.

  2. Add Wind’s self-launch/landing impact behavior.

  3. Add each relic’s secondary ability and the Special Event Relic’s Shift + Swap Hand Starfall.

  4. Preserve passive effects and cooldown rules while wiring the new abilities into the existing listener and command flow.

Implemented:

  • Shift + F relic activation

    • Secondary abilities now activate through PlayerSwapHandItemsEvent.

    • Special Event Relic uses Shift + F for Starfall.

    • Wind Relic’s main launch ability activates with Shift + F.

    • Normal right-click remains the main activation for other relics.

  • Wind Relic

    • Launches the user approximately 5–10 blocks upward.

    • Tracks the airborne player.

    • Creates a cloud, explosion, gust, and smash-style sound effect when they land.

    • Fall damage immunity remains active.

  • Mob support

    • Sand, Warden, Ocean, Flame, and Special Event abilities now affect LivingEntity targets, including mobs.

  • Secondary abilities

    • Ocean: Tidal Prison with Mining Fatigue II and Slowness II.

    • Flame: Flame Dash with a fire trail, damage, and fire application.

    • Sand: Sand Tomb immobilization effect.

    • Warden: Darkness Pulse with Darkness and Blindness.

    • Fortune: Lucky Strike mode with double-drop support and a 20% double-damage chance.

    • Special Event: Starfall with five random lightning strikes.

  • Cooldowns

    • Secondary cooldowns are tracked separately from main abilities.

    • Cooldowns are only applied when an ability successfully finds a target or launches successfully.

    • Secondary cooldowns use the requested timings where specified.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle.kts
manifest.kod
settings.gradle.kts
Code
18 1,089
src/main/kotlin/com/relics/listeners/RelicListener.kt
package com.relics.listeners

import com.relics.*
import com.relics.relics.*
import net.kyori.adventure.text.Component
import org.bukkit.Particle
import org.bukkit.Sound
import org.bukkit.entity.Fireball
import org.bukkit.entity.LivingEntity
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.entity.EntityDamageByEntityEvent
import org.bukkit.event.entity.EntityDamageEvent
import org.bukkit.event.entity.EntityDeathEvent
import org.bukkit.event.entity.ProjectileHitEvent
import org.bukkit.event.player.PlayerInteractEvent
import org.bukkit.event.player.PlayerMoveEvent
import org.bukkit.event.player.PlayerSwapHandItemsEvent
import org.bukkit.potion.PotionEffect
import org.bukkit.potion.PotionEffectType

class RelicListener(private val plugin: RelicPlugin) : Listener {

    private val abilities: Map<RelicType, RelicAbility> = mapOf(
        RelicType.SAND to SandRelic(),
        RelicType.WARDEN to WardenRelic(),
        RelicType.OCEAN to OceanRelic(),
        RelicType.WIND to WindRelic(),
        RelicType.FLAME to FlameRelic(),
        RelicType.SPECIAL_EVENT to SpecialEventRelic(),
        RelicType.FORTUNE_POWER to FortunePowerRelic()
    )

    private val specialEventRelic: SpecialEventRelic
        get() = abilities[RelicType.SPECIAL_EVENT] as SpecialEventRelic

    private val windRelic: WindRelic
        get() = abilities[RelicType.WIND] as WindRelic

    private val fortunePowerRelic: FortunePowerRelic
        get() = abilities[RelicType.FORTUNE_POWER] as FortunePowerRelic

    @EventHandler
    fun onPlayerInteract(event: PlayerInteractEvent) {
        if (event.action != Action.RIGHT_CLICK_AIR &&
            event.action != Action.RIGHT_CLICK_BLOCK
        ) return

        val item = event.item ?: return
        val relicType = RelicItem.getRelicType(item) ?: return
        val player = event.player

        if (relicType == RelicType.WIND) return

        event.isCancelled = true

        if (relicType == RelicType.SPECIAL_EVENT) {
            activate(
                player,
                relicType,
                "main",
                relicType.cooldownSeconds,
                "Lightning"
            ) { specialEventRelic.lightning(player) }
            return
        }

        val ability = abilities[relicType] ?: return
        activate(
            player,
            relicType,
            "main",
            relicType.cooldownSeconds,
            relicType.displayName
        ) { ability.activate(player) }
    }

    @EventHandler
    fun onPlayerSwapHandItems(event: PlayerSwapHandItemsEvent) {
        val player = event.player
        val item = player.inventory.itemInMainHand
        val relicType = RelicItem.getRelicType(item) ?: return

        if (!player.isSneaking && relicType != RelicType.SPECIAL_EVENT) return

        event.isCancelled = true

        if (relicType == RelicType.SPECIAL_EVENT) {
            if (player.isSneaking) {
                activate(
                    player,
                    relicType,
                    "starfall",
                    600L,
                    "Starfall"
                ) { specialEventRelic.starfall(player) }
            } else {
                activate(
                    player,
                    relicType,
                    "dash",
                    60L,
                    "Dash"
                ) { specialEventRelic.dash(player) }
            }
            return
        }

        val ability = abilities[relicType] ?: return
        val cooldownSeconds = when (relicType) {
            RelicType.OCEAN, RelicType.SAND -> 90L
            RelicType.FLAME -> 60L
            RelicType.WARDEN, RelicType.FORTUNE_POWER -> 120L
            else -> relicType.cooldownSeconds
        }

        activate(
            player,
            relicType,
            "secondary",
            cooldownSeconds,
            "${relicType.displayName} secondary"
        ) { ability.secondaryActivate(player) }
    }

    @EventHandler
    fun onEntityDamage(event: EntityDamageEvent) {
        if (event.cause != EntityDamageEvent.DamageCause.FALL) return

        val player = event.entity as? Player ?: return

        if (hasRelicInInventory(player, RelicType.WIND)) {
            event.isCancelled = true
        }
    }

    @EventHandler
    fun onPlayerMove(event: PlayerMoveEvent) {
        if (!event.player.isOnGround) return
        if (windRelic.consumeLanding(event.player)) {
            windRelic.createLandingEffect(event.player)
        }
    }

    @EventHandler
    fun onEntityDamageByEntity(event: EntityDamageByEntityEvent) {
        val attacker = event.damager as? Player ?: return
        if (fortunePowerRelic.isLucky(attacker) && Math.random() < 0.2) {
            event.damage *= 2.0
            attacker.world.spawnParticle(Particle.CRIT, event.entity.location.add(0.0, 1.0, 0.0), 20, 0.5, 0.5, 0.5, 0.1)
            attacker.world.playSound(event.entity.location, Sound.ENTITY_PLAYER_ATTACK_CRIT, 1.0f, 1.4f)
        }
    }

    @EventHandler
    fun onEntityDeath(event: EntityDeathEvent) {
        val killer = event.entity.killer ?: return
        if (fortunePowerRelic.isLucky(killer)) {
            event.drops.addAll(event.drops.toList())
            killer.world.spawnParticle(Particle.HAPPY_VILLAGER, event.entity.location, 25, 0.7, 0.8, 0.7, 0.1)
        }
    }

    @EventHandler
    fun onProjectileHit(event: ProjectileHitEvent) {
        val fireball = event.entity as? Fireball ?: return
        val container = fireball.persistentDataContainer

        if (!container.has(RelicItem.FLAME_RELIC_KEY)) return

        val world = fireball.world
        val shooter = fireball.shooter as? Player

        for (entity in world.getNearbyEntities(fireball.location, 3.0, 3.0, 3.0)) {
            if (entity is LivingEntity && entity != shooter) {
                entity.damage(8.0, shooter)
                entity.fireTicks = 100
            }
        }

        world.createExplosion(fireball.location, 0f, false, false)
        world.playSound(fireball.location, Sound.ENTITY_GENERIC_EXPLODE, 1.0f, 1.0f)
        world.spawnParticle(Particle.FLAME, fireball.location, 40, 1.5, 1.0, 1.5, 0.08)
        world.spawnParticle(Particle.SMOKE, fireball.location, 25, 1.0, 0.8, 1.0, 0.05)
    }

    fun applyPassiveEffects() {
        for (player in plugin.server.onlinePlayers) {
            if (hasRelicInInventory(player, RelicType.OCEAN)) {
                player.addPotionEffect(
                    PotionEffect(
                        PotionEffectType.WATER_BREATHING,
                        200,
                        0,
                        true,
                        false
                    )
                )