summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/bukkit
diff options
context:
space:
mode:
authorEvilSeph <evilseph@gmail.com>2012-10-29 12:37:45 -0400
committerEvilSeph <evilseph@gmail.com>2012-10-29 23:18:37 -0400
commit3047a424bb86697a73071bb2763dc27cb3d27514 (patch)
tree6f4c3b2448470812f0f6b8ebefc869de9c5c5c10 /src/main/java/org/bukkit
parentaba7e2faf1d423a1b20ddae20b3b03daef10cf29 (diff)
downloadcraftbukkit-3047a424bb86697a73071bb2763dc27cb3d27514.tar
craftbukkit-3047a424bb86697a73071bb2763dc27cb3d27514.tar.gz
craftbukkit-3047a424bb86697a73071bb2763dc27cb3d27514.tar.lz
craftbukkit-3047a424bb86697a73071bb2763dc27cb3d27514.tar.xz
craftbukkit-3047a424bb86697a73071bb2763dc27cb3d27514.zip
Expose API for giving and taking experience levels for use with ExpCommand's new behaviour with Minecraft 1.4. Adds BUKKIT-2739
Diffstat (limited to 'src/main/java/org/bukkit')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 34494460..a1e9f85c 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;
}