Fix an infinite recursion

This commit is contained in:
AverageGithub 2024-03-09 17:21:06 +01:00
parent 28eaaf9e02
commit 73b53feba5

View File

@ -656,7 +656,7 @@ class Minion(
setTool(it) setTool(it)
linkedInventory?.remove(it) linkedInventory?.remove(it)
return canUseTool() return true
} }
setTool(ItemStack(Material.AIR)) setTool(ItemStack(Material.AIR))
} else { } else {
@ -674,7 +674,7 @@ class Minion(
linkedInventory?.addItem(getTool()) linkedInventory?.addItem(getTool())
setTool(it) setTool(it)
linkedInventory?.remove(it) linkedInventory?.remove(it)
return canUseTool() return true
} }
} }
return false return false