Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 20:40:08 +01:00
SPIGOT-1051: CraftInventoryPlayer.setItem can cause NPE.
Dieser Commit ist enthalten in:
Ursprung
af00fd2a20
Commit
09ddd9b35e
@ -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()
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren