Fixed replenish

This commit is contained in:
Auxilor 2023-01-23 11:09:47 +00:00
parent ccd7b5cc27
commit 9af6449c60

View File

@ -58,9 +58,13 @@ class EnchantmentReplenish(
if (enchant.config.getBool("consume-seeds")) { if (enchant.config.getBool("consume-seeds")) {
val item = ItemStack( val item = ItemStack(
if (type == Material.WHEAT) { when (type) {
Material.WHEAT_SEEDS Material.WHEAT -> Material.WHEAT_SEEDS
} else type Material.POTATOES -> Material.POTATO
Material.CARROTS -> Material.CARROT
Material.BEETROOTS -> Material.BEETROOT_SEEDS
else -> type
}
) )
val hasSeeds = player.inventory.removeItem(item).isEmpty() val hasSeeds = player.inventory.removeItem(item).isEmpty()