var scriptName = "DamageIndicator"; 
var scriptVersion = 1.0; 
var scriptAuthor = "soulplexis";

var exampleModule = new ExampleModule();
var exampleModuleClient;

function ExampleModule() {
	var ticks = 0;
    this.getName = function() {
        return "HurtIndicator";
    };

    this.getDescription = function() {
        return "Warns you if you get hurt or die.";
    };

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

    this.onMotion = function() {
		ticks++;
			if(mc.thePlayer.hurtTime > 0 && ticks >= 20) {
			chat.print("§8[§4§lLiquidBounce§8] " + "§cYou got hurt!");
			ticks = 0;
			}
			if(mc.thePlayer.getHealth() <= 0) {
			chat.print("§8[§4§lLiquidBounce§8] " + "§o§cYou died!");
			}
	}
	this.onDisable = function() {
	}
}

function onLoad() {
};

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

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