From 73b53feba555cea35005af8f3130cea8ff165b15 Mon Sep 17 00:00:00 2001 From: AverageGithub Date: Sat, 9 Mar 2024 17:21:06 +0100 Subject: [PATCH] Fix an infinite recursion --- .../kotlin/com/artillexstudios/axminions/minions/Minion.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/kotlin/com/artillexstudios/axminions/minions/Minion.kt b/common/src/main/kotlin/com/artillexstudios/axminions/minions/Minion.kt index c5a198c..ffe2b21 100644 --- a/common/src/main/kotlin/com/artillexstudios/axminions/minions/Minion.kt +++ b/common/src/main/kotlin/com/artillexstudios/axminions/minions/Minion.kt @@ -656,7 +656,7 @@ class Minion( setTool(it) linkedInventory?.remove(it) - return canUseTool() + return true } setTool(ItemStack(Material.AIR)) } else { @@ -674,7 +674,7 @@ class Minion( linkedInventory?.addItem(getTool()) setTool(it) linkedInventory?.remove(it) - return canUseTool() + return true } } return false