Removed unneeded event call

This commit is contained in:
0ft3n
2022-01-18 02:00:10 +03:00
committed by GitHub
parent c0547a7c34
commit 06561c5387

View File

@@ -73,12 +73,10 @@ open class EcoDropQueue(val player: Player) : InternalDropQueue {
world.dropItem(location, drop!!).velocity = Vector()
}
if (xp > 0) {
val event = PlayerExpChangeEvent(player, xp)
Bukkit.getPluginManager().callEvent(event)
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 = event.amount
orb.experience = xp
}
} else {
for (drop in items) {
@@ -94,4 +92,4 @@ open class EcoDropQueue(val player: Player) : InternalDropQueue {
init {
location = player.location
}
}
}