This would provide a fix to the all dreaded Fly Glitch
What this needs:
-A Pk flying perm [bending.fly possibly]
-A few coding things
First off this would add an ArrayList as such [ArrayList<Player> flying]
This would store the players that are using a flying ability. Whenever they use an ability that enables their fly mode, they will be added to the ArrayList, and whenever they stopped using the ability, they would be removed. This also needs a new method in GeneralMethods:
Now this needs one last thing somewhere in the Runnable class method run():
I know it's not the greatest, but it's a fix.
I'm sure the devs could perfect this and make it work beautifully
What this needs:
-A Pk flying perm [bending.fly possibly]
-A few coding things
First off this would add an ArrayList as such [ArrayList<Player> flying]
This would store the players that are using a flying ability. Whenever they use an ability that enables their fly mode, they will be added to the ArrayList, and whenever they stopped using the ability, they would be removed. This also needs a new method in GeneralMethods:
Code:
public static boolean isUsingFlyingAbility(Player player) {
if (flying.contains(player)) {
return true;
}
return false;
}
Code:
public static void run() {
for (Player player : Bukkit.getOnlinePlayers()) {
if (!GeneralMethods.isUsingFlyingAbility(player) && !player.hasPermission("bending.fly")) {
player.setFlying(false);
player.setAllowFlight(false);
}
}
}
I'm sure the devs could perfect this and make it work beautifully