mirror of
https://github.com/darksaid98/Flashback.git
synced 2026-12-01 14:38:50 +00:00
Ignore SetPlayerInventory packets and fix OOB crash related to it
This commit is contained in:
1 parent
73267df7b2
commit
396555dd80
2 files changed
+5
No files matched your search
@@ -1128,6 +1128,10 @@ public class ReplayGamePacketHandler implements ClientGamePacketListener {
|
||||
ItemStack itemStack = clientboundSetPlayerInventoryPacket.contents();
|
||||
player.getInventory().setItem(slot, itemStack);
|
||||
|
||||
if (slot < 0 || slot > 9) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (ReplayPlayer replayViewer : this.replayServer.getReplayViewers()) {
|
||||
if (Objects.equals(replayViewer.lastFirstPersonDataUUID, player.getUUID())) {
|
||||
replayViewer.lastFirstPersonHotbarItems[slot] = itemStack.copy();
|
||||
|
||||
Reference in new issue
Block a user