From 064fbd0f36ead957b0a7fcba734a0049edabf7bb Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Tue, 8 Oct 2024 09:53:45 +0700 Subject: [PATCH] /clear command should also remove exopack energy and battery --- .../kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayer.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayer.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayer.kt index 981f26e04..52f63fc06 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayer.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayer.kt @@ -1624,7 +1624,7 @@ class MatteryPlayer(val ply: Player) { @JvmStatic fun inventoryClearContent(inventory: Inventory) { - val mattery = inventory.player.matteryPlayer ?: return + val mattery = inventory.player.matteryPlayer if (!mattery.hasExopack) { return @@ -1632,7 +1632,8 @@ class MatteryPlayer(val ply: Player) { mattery.exopackContainer.clearContent() mattery.exopackChargeSlots.clearContent() - // mattery.exoPackEnergy.parent.clearContent() + mattery.exopackEnergy.parent.clearContent() + mattery.exopackEnergy.parent.drainBattery() for (smelter in mattery.smelters) { smelter.input.clearContent()