From 796d4a8a74d640ee00a4e0480eded756aac518f7 Mon Sep 17 00:00:00 2001 From: Feildmaster Date: Wed, 22 Feb 2012 11:03:56 -0600 Subject: [PATCH] [Bleeding] Fixed setTotalExp, any experience update bugs and removed Deprecated Methods. Fixes BUKKIT-798 and fixes BUKKIT-797 --- .../craftbukkit/entity/CraftPlayer.java | 22 ++----------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index fe9e72b62a..7311039de2 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -65,10 +65,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player { perm.recalculatePermissions(); } - public boolean isPlayer() { - return true; - } - public boolean isOnline() { for (Object obj : server.getHandle().players) { EntityPlayer player = (EntityPlayer) obj; @@ -486,20 +482,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void setExp(float exp) { getHandle().exp = exp; - - giveExp(0); - } - - public int getExperience() { - return (int) (getExp() * 100); - } - - public void setExperience(int exp) { - setExp(exp / 100); + getHandle().lastSentExp = -1; } public int getLevel() { - return (int) getHandle().expLevel; + return getHandle().expLevel; } public void setLevel(int level) { @@ -513,11 +500,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void setTotalExperience(int exp) { getHandle().expTotal = exp; - getHandle().lastSentExp = -1; - - if (getTotalExperience() > getExperience()) { - getHandle().expTotal = getTotalExperience(); - } } public float getExhaustion() {