mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-14 04:47:51 +00:00
Fixed most of the Fly glitch.
This commit is contained in:
parent
0599d39da9
commit
17bed64b98
1 changed files with 31 additions and 19 deletions
|
@ -84,7 +84,8 @@ public class Flight {
|
|||
|
||||
for (Player player : instances.keySet()) {
|
||||
Flight flight = instances.get(player);
|
||||
if (avatarstateplayers.contains(player) || airscooterplayers.contains(player) || waterspoutplayers.contains(player) || airspoutplayers.contains(player) || sandspoutplayers.contains(player)) {
|
||||
if (System.currentTimeMillis() <= flight.time + duration) {
|
||||
if (airscooterplayers.contains(player) || waterspoutplayers.contains(player) || airspoutplayers.contains(player) || sandspoutplayers.contains(player)) {
|
||||
continue;
|
||||
}
|
||||
if (Bloodbending.isBloodbended(player)) {
|
||||
|
@ -101,12 +102,23 @@ public class Flight {
|
|||
newflyingplayers.add(player);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (flight.source == null) {
|
||||
flight.revert();
|
||||
flight.remove();
|
||||
} else {
|
||||
if (System.currentTimeMillis() >= flight.time + duration) {
|
||||
flight.revert();
|
||||
flight.remove();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (flight.source == null) {
|
||||
flight.revert();
|
||||
flight.remove();
|
||||
continue;
|
||||
}
|
||||
if (System.currentTimeMillis() > flight.time + duration) {
|
||||
flight.revert();
|
||||
flight.remove();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue