var scriptName = "StepHelper";
var scriptVersion = 1.0;
var scriptAuthor = "yorik100";

var cleanStep = new CleanStep();

var C03PacketPlayer = Java.type('net.minecraft.network.play.client.C03PacketPlayer');

var client;

function CleanStep() {
    this.getName = function() {
        return "StepHelper";
    };

    this.getDescription = function() {
        return "Clean step";
    };

    this.getCategory = function() {
        return "Movement";
    };
    this.onEnable = function() {
    }
this.onUpdate = function() {
	if ((mc.thePlayer.isCollidedHorizontally) && !mc.thePlayer.onGround){
		mc.thePlayer.onGround = true;
		mc.gameSettings.keyBindJump.pressed = false;
                mc.thePlayer.sendQueue.addToSendQueue(new C03PacketPlayer(false));
	}
}
    this.onDisable = function () {
    }
}

function onLoad() {}

function onEnable() {
    client = moduleManager.registerModule(cleanStep);
}

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