Code (Text): private void Levitate(Player player, int length) { new BukkitRunnable() { int time = length*20; @Override public void run() { time--; player.setVelocity(new Vector(0D, .1D, 0D)); if (time == 0) { return; } } }.runTaskTimer(main, 0L, 1L); } } [12:10:34 WARN]: Falcon_Seeker was kicked for floating too long! [12:10:34 INFO]: Falcon_Seeker lost connection: Flying is not enabled on this server [12:10:34 INFO]: Falcon_Seeker left the game. [12:10:34 WARN]: handleDisconnection() called twice
I'm assuming by the "Solved" tag that worked for you, but doesn't that also let them double-tap space to enter creative mode flight?
no because i also did Code (Text): player.setFlying(false); player.setVelocity(new Vector(player.getVelocity().getX(), .5D, player.getVelocity().getZ())); if (time == 0) { player.setAllowFlight(false); cancel(); return; }