Not Kicking Players for Flying

Discussion in 'Plugin Development' started by Lactem, May 23, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    Lactem

    I would like to override the default Bukkit system of kicking players for flying. On the PlayerMoveEvent, I have it set to do stuff that will get a player on survival kicked, so does anyone know how to stop that from happening?

    Thanks,
    Lactem
     
  2. Offline

    xize

    you could do:

    Code:
    @EventHandler
    public void playerJoin(PlayerJoinEvent e) {
              e.getPlayer().setAllowFlight(true);
    }
    
     
  3. Offline

    Lactem

    That allows the player to fly, which is not what I want.
     
  4. Offline

    xize

    if I'm correct it doesn't kick you, btw it's not the setFlying(true) which is used for survival fly:p, or do you want change things internal?
     
  5. Offline

    Minnymin3

    Isn't there a way to modify server. properties? Im not sure how but im pretty sure theres a way to do it.
     
  6. Offline

    Lactem

    Actually, that does let the player fly. To answer your question, I just want to make the server not kick the player without letting them fly or changing settings for the whole server. (I think that's what you were thinking by internal.) The user shouldn't have to do anything. To review, they shouldn't be able to fly, but if they are flying, then the server shouldn't kick them for flying.

    The server owner shouldn't have to do that step. Plus, that would mean everyone with hacked clients could go around flying.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 1, 2016
  7. Offline

    Minnymin3

    You can't stop people from getting kicked for flying and not let the hackers fly.
     
  8. Offline

    Garris0n

    *cough* nocheat *cough*
     
  9. Offline

    Minnymin3

    People get kicked if they fly. Hes asking how to prevent that. To prevent that you have to let hackers fly. NoCheat does not prevent players getting kicked for flying it encourages it.

    Or did i completely misread the question?
     
  10. Offline

    Garris0n

    If you fly for too long(in normal bukkit) you get "kicked for flying", which you can disable in the server.properties. Nocheat isn't related to this and would block fly-hackers even though the setting was off for bukkit. Also, in theory maybe you could intercept the kick event and cancel it or something?
     
  11. Offline

    LazyLemons

    I don't think CraftBukkit code uses the player.kickPlayer() method.
     
  12. Offline

    Lactem

    That's pretty much it. I basically want to enable flight-mode in server.properties for a small amount of time.
    Not everyone should be able to fly in this small amount of time. Only the certain player. I hope that clears things up for you a little.
     
  13. Offline

    MyPictures

    Instead it should do what? The fly check is from vanilla Mincraft and is not accessible over the BukkitAPI I fear. You would have to try a hacky way to make this possible, if its even possible somehow.

    I strongly suggest you to simple disable the vanilla fly check by setting allow-flight to true and using an NoCheat plugin such as NoCheatPlus, AntiCheat or SafeGuard instead. I know that NC+ and AC have a API which allows you to control when a player can bypass the fly check and when not (not sure about SG yet).
    Even if the vanilla fly check is enabled it will still allow players to fly up 40 blocks or so and speed hack like crazy.
     
  14. Offline

    Lactem

    I'm not making a plugin that's just for my server. I do NOT want the people that download my plugin to have to change their server settings to allow hackers.
     
Thread Status:
Not open for further replies.

Share This Page