How to keep a player from getting kicked for flying.

Discussion in 'Plugin Development' started by UaVxChallenge, Feb 8, 2015.

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

    UaVxChallenge

    Does anyone know a better way to do this? The only reason I am afraid of this is because it will spam the console with "{Player} was kicked for flying". I don't want to completely block out kicking

    Code:
        @EventHandler
        public void playerKick(PlayerKickEvent e){
           
            if(e.getReason().equalsIgnoreCase("Flying is not enabled on this server")){
            e.setCancelled(true);
            }       
           
        }
    
    
     
  2. Offline

    BurnerDiamond

    Just put flying enabled on the server properties....
     
    Konato_K likes this.
  3. Offline

    UaVxChallenge

    The thing is you cant tell every server owner that uses the plugin to enable flying because that could cause errors with other plugins. I could sudo it but I don't know if it would be the best way.
     
Thread Status:
Not open for further replies.

Share This Page