diff --git a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilEnt.java b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilEnt.java index cd63f9f77..3913574f7 100644 --- a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilEnt.java +++ b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilEnt.java @@ -537,9 +537,9 @@ public class UtilEnt return ent.isOnGround(); } - AxisAlignedBB box = ((CraftEntity)ent).getHandle().getBoundingBox(); - Location bottom_corner_1 = new Location(ent.getWorld(), box.a, ent.getLocation().getY()-0.1, box.c); - Location bottom_corner_2 = new Location(ent.getWorld(), box.d, ent.getLocation().getY()-0.1, box.f); + AxisAlignedBB box = ((CraftEntity)ent).getHandle().getBoundingBox().shrink(0.05, 0, 0.05); + Location bottom_corner_1 = new Location(ent.getWorld(), box.a, ent.getLocation().getY()-0.05, box.c); + Location bottom_corner_2 = new Location(ent.getWorld(), box.d, ent.getLocation().getY()-0.05, box.f); for(Block b : UtilBlock.getInBoundingBox(bottom_corner_1, bottom_corner_2)){ if(UtilBlock.solid(b)) return true; diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/modules/JumpManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/modules/JumpManager.java index e86d2e3c6..fb2c0090e 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/modules/JumpManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/modules/JumpManager.java @@ -1,5 +1,6 @@ package mineplex.hub.modules; +import org.bukkit.Bukkit; import org.bukkit.Effect; import org.bukkit.GameMode; import org.bukkit.block.BlockFace; @@ -18,6 +19,7 @@ import mineplex.core.disguise.disguises.DisguiseBat; import mineplex.core.disguise.disguises.DisguiseChicken; import mineplex.core.disguise.disguises.DisguiseEnderman; import mineplex.core.disguise.disguises.DisguiseWither; +import mineplex.core.recharge.Recharge; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; import mineplex.hub.HubManager; @@ -66,6 +68,8 @@ public class JumpManager extends MiniPlugin //Sound player.playEffect(player.getLocation(), Effect.BLAZE_SHOOT, 0); + + Recharge.Instance.useForce(player, "Double Jump", 500); } @EventHandler @@ -94,8 +98,11 @@ public class JumpManager extends MiniPlugin if (UtilEnt.isGrounded(player) || UtilBlock.solid(player.getLocation().getBlock().getRelative(BlockFace.DOWN))) { - player.setAllowFlight(true); - player.setFlying(false); + if(!player.getAllowFlight() && Recharge.Instance.usable(player, "Double Jump")) + { + player.setAllowFlight(true); + player.setFlying(false); + } } } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkDoubleJump.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkDoubleJump.java index 018522154..7ca633d75 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkDoubleJump.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkDoubleJump.java @@ -101,6 +101,8 @@ public class PerkDoubleJump extends Perk Recharge.Instance.setDisplayForce(player, GetName(), true); } } + + Recharge.Instance.useForce(player, "Double Jump", 500); } @EventHandler @@ -119,6 +121,9 @@ public class PerkDoubleJump extends Perk if (_recharge > 0 && !Recharge.Instance.usable(player, GetName())) continue; + + if (!Recharge.Instance.usable(player, "Double Jump")) + continue; if (UtilEnt.isGrounded(player) || UtilBlock.solid(player.getLocation().getBlock().getRelative(BlockFace.DOWN))) player.setAllowFlight(true);