onEvent('entity.attack', event => {
	if(event.server && event.source.player) {
		const lostEmpressItem = Item.of("kubejs:the_lost_empress").getItem();
		const itemCooldownExist = event.source.player.minecraftPlayer.func_184811_cZ().func_185141_a(lostEmpressItem);
		if(event.source.player.mainHandItem == 'kubejs:the_lost_empress' && !itemCooldownExist && !event.source.player.isCrouching()) {
			if(!event.source.player.mainHandItem.hasEnchantment("minecraft:sharpness", 5)) {
				event.server.runCommandSilent(`execute as ${event.source.player.name} run effect give @s minecraft:saturation 1 2`);
				event.source.player.health = event.source.player.health - 1;
				event.source.player.addItemCooldown('kubejs:the_lost_empress', 100);
				event.source.player.sendInventoryUpdate()
			}
		}
	}
})