From 3047a424bb86697a73071bb2763dc27cb3d27514 Mon Sep 17 00:00:00 2001 From: EvilSeph Date: Mon, 29 Oct 2012 12:37:45 -0400 Subject: [PATCH] Expose API for giving and taking experience levels for use with ExpCommand's new behaviour with Minecraft 1.4. Adds BUKKIT-2739 --- src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 3449446052..a1e9f85cd9 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -539,6 +539,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { getHandle().giveExp(exp); } + public void giveExpLevels(int levels) { + getHandle().levelDown(levels); + } + public float getExp() { return getHandle().exp; }