# 3. Our first mod!

So i want to make Flight mod as first module. Create a class in your modules package and add the following code:

package com.demez.module.movement;

import com.demez.module.Module;

public class Flight extends Module{
    public Flight(){
        super(”Flight”, Keyborard.KEY_F, Category.MOVEMENT);
    }

    @Override
    public void onEnable(){
        if (this.isToggled){
            mc.thePlayer.capabilities.isFlying = true;
            mc.thePlayer.capabilities.allowFlying = true;
        }
        super.onEnable();
    }

    @Ovverride
    public void onDisable(){
            mc.thePlayer.capabilities.isFlying = true;
            mc.thePlayer.capabilities.allowFlying = true;
        
    }
}

So we need to register that, if we dont it wont work. So hop on ModuleManager.java and type the following code:

//MOVEMENT
modules.add(new Flight());

After that, if you launch your game and click game in your world (in survival) you must be able to fly.