diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayerCapability.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayerCapability.kt index b020e4021..42c20b78d 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayerCapability.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayerCapability.kt @@ -230,7 +230,7 @@ class MatteryPlayerCapability(val ply: Player) : ICapabilityProvider, INBTSerial private var _exoPackMenu: ExoPackInventoryMenu? = null set(value) { if (field == ply.containerMenu) { ply.closeContainer() } - field?.removed(ply) + field?.actuallyRemoved() field = value } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/ExoPackInventoryMenu.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/ExoPackInventoryMenu.kt index 73ca8a4bb..9c70413a4 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/ExoPackInventoryMenu.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/ExoPackInventoryMenu.kt @@ -121,12 +121,16 @@ class ExoPackInventoryMenu(val capability: MatteryPlayerCapability) : MatteryMen } } + fun actuallyRemoved() { + isRemoved = true + removed(capability.ply) + } + override fun removed(player: Player) { if (player != capability.ply) { throw RuntimeException("what.") } - isRemoved = true super.removed(player) craftingResultContainer.clearContent()