var scriptName = "Manual Flight"; 
var scriptVersion = 1.0; 
var scriptAuthor = "soulplexis";

var blockHit = new BlockHit();
var blockHitClient;

function BlockHit() {
	var ticks = 0;
    this.getName = function() {
        return "ManualFly";
    };

    this.getDescription = function() {
        return "Double tap space to fly like in creative mode.";
    };

    this.getCategory = function() {
        return "Movement";
    };

    this.onUpdate = function() {
		mc.thePlayer.capabilities.allowFlying = true;
    };
	this.onDisable = function() {
		mc.thePlayer.capabilities.allowFlying = false;
		mc.thePlayer.capabilities.isFlying = false;
	}
}

function onLoad() {
};

function onEnable() {
    blockHitClient = moduleManager.registerModule(blockHit);
};

function onDisable() {
    moduleManager.unregisterModule(blockHitClient);
};