mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-21 14:55:17 +01:00
Fixed replenish
This commit is contained in:
parent
ccd7b5cc27
commit
9af6449c60
@ -58,9 +58,13 @@ class EnchantmentReplenish(
|
||||
|
||||
if (enchant.config.getBool("consume-seeds")) {
|
||||
val item = ItemStack(
|
||||
if (type == Material.WHEAT) {
|
||||
Material.WHEAT_SEEDS
|
||||
} else type
|
||||
when (type) {
|
||||
Material.WHEAT -> Material.WHEAT_SEEDS
|
||||
Material.POTATOES -> Material.POTATO
|
||||
Material.CARROTS -> Material.CARROT
|
||||
Material.BEETROOTS -> Material.BEETROOT_SEEDS
|
||||
else -> type
|
||||
}
|
||||
)
|
||||
|
||||
val hasSeeds = player.inventory.removeItem(item).isEmpty()
|
||||
|
Loading…
Reference in New Issue
Block a user