diff --git a/src/com/projectkorra/projectkorra/airbending/AirFlight.java b/src/com/projectkorra/projectkorra/airbending/AirFlight.java index e563eb70..307fdbab 100644 --- a/src/com/projectkorra/projectkorra/airbending/AirFlight.java +++ b/src/com/projectkorra/projectkorra/airbending/AirFlight.java @@ -21,6 +21,7 @@ public class AirFlight extends FlightAbility { private int maxHitsBeforeRemoval; private double speed; private Flight flight; + static int hoverY; public AirFlight(Player player) { super(player); @@ -71,6 +72,7 @@ public class AirFlight extends FlightAbility { HOVERING.put(playername, new PlayerFlyData(player.getAllowFlight(), player.isFlying())); player.setVelocity(new Vector(0, 0, 0)); player.setFlying(true); + hoverY = Integer.valueOf((int) player.getLocation().getY()); } } else { if (HOVERING.containsKey(playername)) { @@ -107,6 +109,15 @@ public class AirFlight extends FlightAbility { Vector vec = player.getVelocity().clone(); vec.setY(0); player.setVelocity(vec); + if (!Integer.valueOf((int) player.getLocation().getY()).equals(hoverY)) { + Location loc = new Location(player.getWorld(), + player.getLocation().getX(), + hoverY + 0.5, + player.getLocation().getZ(), + player.getLocation().getYaw(), + player.getLocation().getPitch()); + player.teleport(loc); + } } else { player.setVelocity(player.getEyeLocation().getDirection().normalize().multiply(speed)); } diff --git a/src/com/projectkorra/projectkorra/command/WhoCommand.java b/src/com/projectkorra/projectkorra/command/WhoCommand.java index 38a2d5e7..22121455 100644 --- a/src/com/projectkorra/projectkorra/command/WhoCommand.java +++ b/src/com/projectkorra/projectkorra/command/WhoCommand.java @@ -59,10 +59,10 @@ public class WhoCommand extends PKCommand { staff.put("679a6396-6a31-4898-8130-044f34bef743", ChatColor.DARK_PURPLE + "ProjectKorra Developer"); // savior67 staff.put("1c30007f-f8ef-4b4e-aff0-787aa1bc09a3", ChatColor.DARK_PURPLE + "ProjectKorra Developer"); // Sorin staff.put("dd578a4f-d35e-4fed-94db-9d5a627ff962", ChatColor.DARK_PURPLE + "ProjectKorra Developer"); // Sobki + staff.put("ed8c05af-eb43-4b71-9be3-c2ccca6c849a", ChatColor.DARK_PURPLE + "ProjectKorra Developer"); // Matan staff.put("623df34e-9cd4-438d-b07c-1905e1fc46b6", ChatColor.GREEN + "ProjectKorra Concept Designer"); // Loony staff.put("3c484e61-7876-46c0-98c9-88c7834dc96c", ChatColor.GREEN + "ProjectKorra Concept Designer"); // SamuraiSnowman (Zmeduna) - staff.put("1d4a8a47-1f3b-40a6-b412-c15d874491b8", ChatColor.GREEN + "ProjectKorra Concept Designer"); // Fyf staff.put("3d5bc713-ab8b-4125-b5ba-a1c1c2400b2c", ChatColor.GOLD + "ProjectKorra Community Moderator"); // Gold staff.put("38217173-8a32-4ba7-9fe1-dd4fed031a74", ChatColor.GOLD + "ProjectKorra Community Moderator"); // Easte