onEvent('item.right_click', event => {
	if(event.server) {
		if(event.item.id == 'kubejs:the_lost_empress' && event.player.isCrouching()) {
			if(!event.item.hasEnchantment("minecraft:sharpness", 5)) {
				const newItem = event.item.enchant("minecraft:sharpness", 5).enchant("minecraft:looting", 5);
				const lostEmpressItem = Item.of("kubejs:the_lost_empress").getItem();
          		event.player.mainHandItem = newItem;
				event.player.setHealth(5);
				event.server.runCommandSilent(`execute as ${event.player.name} run effect give @s minecraft:speed 20 4`);
				event.server.runCommandSilent(`execute as ${event.player.name} run effect give @s minecraft:resistance 5 5`);
				event.player.addItemCooldown('kubejs:the_lost_empress', 500);
				event.server.schedule(20000, callback => {
					const slotIndex = event.player.inventory.find(newItem);
                	if(slotIndex == -1) {
                    	// do some error handling
                    	
                	}
                	else {
                		event.player.inventory.set(slotIndex, lostEmpressItem);
        			}
				});
			}
		}
	}
})