Fixed movement while hovering with Flight (#541)

* Fixed your own water manips breaking spout

* Fixed Surge wave freeze from not reverting ice to water

Surge wave now reverts the ice blocks back to water if they were
originally water :)))))

* Fixed movement while hovering with Flight

You can no longer use shift or space to move up or down respectively
while hovering with Flight. New developer Matan also added to /b who
This commit is contained in:
Sobki 2016-08-14 09:07:30 +10:00 committed by OmniCypher
parent cb219ca067
commit 00097da45a
2 changed files with 12 additions and 1 deletions

View file

@ -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));
}

View file

@ -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