diff --git a/eco-core/core-backend/build.gradle.kts b/eco-core/core-backend/build.gradle.kts index 363b898b..f951608d 100644 --- a/eco-core/core-backend/build.gradle.kts +++ b/eco-core/core-backend/build.gradle.kts @@ -6,7 +6,7 @@ dependencies { implementation("org.reflections:reflections:0.9.12") implementation("org.objenesis:objenesis:3.2") - compileOnly("org.spigotmc:spigot-api:1.20.2-R0.1-SNAPSHOT") + compileOnly("io.papermc.paper:paper-api:1.20.2-R0.1-SNAPSHOT") compileOnly("me.clip:placeholderapi:2.11.4") compileOnly("net.kyori:adventure-text-minimessage:4.10.0") compileOnly("net.kyori:adventure-platform-bukkit:4.1.0") diff --git a/eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/drops/EcoDropQueue.kt b/eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/drops/EcoDropQueue.kt index 0f6e6d57..5d68219a 100644 --- a/eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/drops/EcoDropQueue.kt +++ b/eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/drops/EcoDropQueue.kt @@ -1,5 +1,6 @@ package com.willfp.eco.internal.drops +import com.willfp.eco.core.Prerequisite import com.willfp.eco.core.drops.DropQueue import com.willfp.eco.core.events.DropQueuePushEvent import com.willfp.eco.core.integrations.antigrief.AntigriefManager @@ -72,10 +73,17 @@ open class EcoDropQueue(val player: Player) : DropQueue() { world.dropItem(location, drop!!).velocity = Vector() } if (xp > 0) { - val orb = - world.spawnEntity(player.location.add(0.0, 0.2, 0.0), EntityType.EXPERIENCE_ORB) as ExperienceOrb - orb.velocity = Vector(0, 0, 0) - orb.experience = xp + if (Prerequisite.HAS_PAPER.isMet) { + player.giveExp(xp, true) + } else { + val orb = + world.spawnEntity( + player.location.add(0.0, 0.2, 0.0), + EntityType.EXPERIENCE_ORB + ) as ExperienceOrb + orb.velocity = Vector(0, 0, 0) + orb.experience = xp + } } } else { for (drop in items) {