Skip to content

Commit

Permalink
Fix PacketItems#handleSetEquipment trying to modify possibly immutabl…
Browse files Browse the repository at this point in the history
…e lists
  • Loading branch information
NichtStudioCode committed Apr 16, 2023
1 parent 0240408 commit 59b0ea3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ internal object PacketItems : Listener {
@PacketHandler
private fun handleSetEquipment(event: ClientboundSetEquipmentPacketEvent) {
val player = event.player
val slots = event.slots
val slots = ArrayList(event.slots).also { event.slots = it }

slots.forEachIndexed { i, pair ->
slots[i] = MojangPair(
Expand Down

0 comments on commit 59b0ea3

Please sign in to comment.