fix container close packet sending

This commit is contained in:
Bixilon 2023-02-05 17:53:34 +01:00
parent 9c833c0599
commit 6f0618b1c6
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -190,7 +190,6 @@ abstract class Container(
}
fun close(force: Boolean = false) {
connection.events.fire(ContainerCloseEvent(connection, this))
onClose()
val id = id ?: return
@ -204,6 +203,8 @@ abstract class Container(
connection.player.openedContainer = null
connection.sendPacket(CloseContainerC2SP(id))
}
connection.events.fire(ContainerCloseEvent(connection, this))
}
protected open fun onClose() {