Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 20:40:08 +01:00
Fixed NPE in player inventory + don't ignore the cancel state of world unloads
Dieser Commit ist enthalten in:
Ursprung
a7664a104f
Commit
e31cedf583
@ -312,7 +312,7 @@ public class InventoryPlayer implements IInventory {
|
||||
}
|
||||
|
||||
public boolean b(Block block) {
|
||||
if (block.material.k()) {
|
||||
if (block != null && block.material.k()) { // CraftBukkit - fix NPE
|
||||
return true;
|
||||
} else {
|
||||
ItemStack itemstack = this.getItem(this.itemInHandIndex);
|
||||
|
@ -596,7 +596,7 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
WorldUnloadEvent e = new WorldUnloadEvent(handle.getWorld());
|
||||
pluginManager.callEvent(new WorldUnloadEvent(handle.getWorld()));
|
||||
pluginManager.callEvent(e);
|
||||
|
||||
if (e.isCancelled()) {
|
||||
return false;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren