3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-16 04:50:05 +01:00

SPIGOT-1051: CraftInventoryPlayer.setItem can cause NPE.

Dieser Commit ist enthalten in:
md_5 2015-07-18 12:43:33 +10:00
Ursprung af00fd2a20
Commit 09ddd9b35e

Datei anzeigen

@ -37,6 +37,7 @@ public class CraftInventoryPlayer extends CraftInventory implements org.bukkit.i
@Override
public void setItem(int index, ItemStack item) {
super.setItem(index, item);
if (this.getHolder() == null) return;
EntityPlayer player = ((CraftPlayer) this.getHolder()).getHandle();
if (player.playerConnection == null) return;
// PacketPlayOutSetSlot places the items differently than setItem()