diff options
author | Parker Hawke <hawkeboyz2@hotmail.com> | 2017-03-19 18:31:40 -0400 |
---|---|---|
committer | Parker Hawke <hawkeboyz2@hotmail.com> | 2017-03-19 18:31:40 -0400 |
commit | b80055abfba170378fb945b743b945db718b3fbd (patch) | |
tree | bbacfa82d296c5a9d1beeebde880af03dbf49f3d /src | |
parent | dfee3d9f9f3b8ea63c21a5c8858f78aa89d3b24d (diff) | |
download | craftbukkit-b80055abfba170378fb945b743b945db718b3fbd.tar craftbukkit-b80055abfba170378fb945b743b945db718b3fbd.tar.gz craftbukkit-b80055abfba170378fb945b743b945db718b3fbd.tar.lz craftbukkit-b80055abfba170378fb945b743b945db718b3fbd.tar.xz craftbukkit-b80055abfba170378fb945b743b945db718b3fbd.zip |
Properly validate player experience bar progress
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 1 |
1 files changed, 1 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 5ba18e68..58ca7ed8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -821,6 +821,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void setExp(float exp) { + Preconditions.checkArgument(exp >= 0.0 && exp <= 1.0, "Experience progress must be between 0.0 and 1.0 (%s)", exp); getHandle().exp = exp; getHandle().lastSentExp = -1; } |