diff options
author | Nathan Adams <dinnerbone@dinnerbone.com> | 2012-01-19 16:06:27 +0000 |
---|---|---|
committer | Nathan Adams <dinnerbone@dinnerbone.com> | 2012-01-19 16:07:18 +0000 |
commit | b0f29b1755d5fcc97be5b508ed5c467a0f4f845b (patch) | |
tree | 68dc26a49beda0928bee6fac79a7535eec5754bf /src/main/java/net/minecraft/server/EntityExperienceOrb.java | |
parent | 1f1c9c0d4b074fff3e21826a655b1b77adedf351 (diff) | |
download | craftbukkit-b0f29b1755d5fcc97be5b508ed5c467a0f4f845b.tar craftbukkit-b0f29b1755d5fcc97be5b508ed5c467a0f4f845b.tar.gz craftbukkit-b0f29b1755d5fcc97be5b508ed5c467a0f4f845b.tar.lz craftbukkit-b0f29b1755d5fcc97be5b508ed5c467a0f4f845b.tar.xz craftbukkit-b0f29b1755d5fcc97be5b508ed5c467a0f4f845b.zip |
Throw PlayerLevelChangeEvent and PlayerExpChangeEvent events. Thanks to feildmaster for the PR.
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityExperienceOrb.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityExperienceOrb.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java index 8a7476b0..26e2204b 100644 --- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java +++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java @@ -1,5 +1,7 @@ package net.minecraft.server; +import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit + public class EntityExperienceOrb extends Entity { public int a; @@ -130,7 +132,7 @@ public class EntityExperienceOrb extends Entity { entityhuman.x = 2; this.world.makeSound(this, "random.orb", 0.1F, 0.5F * ((this.random.nextFloat() - this.random.nextFloat()) * 0.7F + 1.8F)); entityhuman.receive(this, 1); - entityhuman.giveExp(this.value); + entityhuman.giveExp(CraftEventFactory.callPlayerExpChangeEvent(entityhuman, this.value).getAmount()); // CraftBukkit - this.value to event.getAmount() this.die(); } } |