diff --git a/src/de/anura/core/Features.java b/src/de/anura/core/Features.java index 8950ac6..bd7b954 100644 --- a/src/de/anura/core/Features.java +++ b/src/de/anura/core/Features.java @@ -93,6 +93,7 @@ public class Features implements Listener { featureEnabled.get(P).put(f, false); canDoubleJump.put(P, false); Core.statusMsg(P, "dbl_jump_off", true); + P.setExp(0); if (P.getGameMode() != GameMode.CREATIVE) { P.setAllowFlight(false); } @@ -110,6 +111,7 @@ public class Features implements Listener { } featureEnabled.get(P).put(f, true); P.setAllowFlight(true); + P.setExp(1); canDoubleJump.put(P, true); Core.statusMsg(P, "dbl_jump_on", true); } @@ -144,7 +146,7 @@ public class Features implements Listener { if (f.equals(Feature.DOUBLE_JUMP)) { if (!P.getGameMode().equals(GameMode.CREATIVE)) { P.setAllowFlight(false); - P.setFoodLevel(20); + P.setExp(0); } this.canDoubleJump.put(P, false); } @@ -159,6 +161,7 @@ public class Features implements Listener { } if (f.equals(Feature.DOUBLE_JUMP)) { P.setAllowFlight(true); + P.setExp(1); this.canDoubleJump.put(P, true); } } @@ -174,9 +177,9 @@ public class Features implements Listener { } Player P = event.getPlayer(); if (this.hasFeature(P, Feature.DOUBLE_JUMP)) { - if (this.canDoubleJump.containsKey(P) && !this.canDoubleJump.get(P) && ((Entity) P).isOnGround()) { + if (this.canDoubleJump.containsKey(P) && !this.canDoubleJump.get(P) && ((Entity) P).isOnGround() && this.featureEnabled.get(P).get(Feature.DOUBLE_JUMP)) { this.canDoubleJump.put(P, true); - P.setFoodLevel(20); + P.setExp(1); } } } @@ -191,7 +194,7 @@ public class Features implements Listener { if (this.hasFeature(P, Feature.DOUBLE_JUMP) && !P.getGameMode().equals(GameMode.CREATIVE)) { if (this.canDoubleJump.containsKey(P) && this.canDoubleJump.get(P)) { this.canDoubleJump.put(P, false); - P.setFoodLevel(1); + P.setExp(0); Vector v = P.getLocation().getDirection(); P.setVelocity(v.multiply(new Vector(1, 2, 1))); P.setVelocity(P.getVelocity().setY(1));