var scriptName = "MineverseHighJump";
var scriptAuthor = "jody_snake";
var scriptVersion = 1.0;

 Math.rad = function(deg) {
    return deg * Math.PI / 180;
  };

 Math.radians = function(degrees) {
    return degrees * Math.PI / 180;
  };
  
var C03PacketPlayer = Java.type('net.minecraft.network.play.client.C03PacketPlayer');
var C04PacketPlayerPosition = Java.type('net.minecraft.network.play.client.C03PacketPlayer.C04PacketPlayerPosition');

function ExampleModule() {
	var H = value.createFloat("Height", 2, 2, 10);
    this.addValues = function(values) {
		values.add(H);
    }
    this.getName = function() {
        return "MineverseHighJump";
    }
    this.getDescription = function() {
        return "HighJump";
    }
    this.getCategory = function() {
        return "Fun";
    }
    this.onEnable = function() {
		chat.print("§c§lWARNING: §cPlease disable Velocity")
        chat.print("§bThe HighJump Script Make by jody_snake");
    }
    this.onDisable = function() {
		mc.timer.timerSpeed = 1;
    }
    this.onUpdate = function() {
        if(mc.thePlayer.onGround && mc.gameSettings.keyBindJump.pressed){
			mc.thePlayer.sendQueue.addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY + H.get(), mc.thePlayer.posZ, true));
			mc.thePlayer.sendQueue.addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY + (H.get() * 2), mc.thePlayer.posZ, true));
			
		}
    }
}
var exampleModule = new ExampleModule();
var exampleModuleClient;

function onLoad() {}

function onEnable() {
    exampleModuleClient = moduleManager.registerModule(exampleModule);
}

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