Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-21 14:00:11 +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) {
|
public boolean b(Block block) {
|
||||||
if (block.material.k()) {
|
if (block != null && block.material.k()) { // CraftBukkit - fix NPE
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
ItemStack itemstack = this.getItem(this.itemInHandIndex);
|
ItemStack itemstack = this.getItem(this.itemInHandIndex);
|
||||||
|
@ -596,7 +596,7 @@ public final class CraftServer implements Server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
WorldUnloadEvent e = new WorldUnloadEvent(handle.getWorld());
|
WorldUnloadEvent e = new WorldUnloadEvent(handle.getWorld());
|
||||||
pluginManager.callEvent(new WorldUnloadEvent(handle.getWorld()));
|
pluginManager.callEvent(e);
|
||||||
|
|
||||||
if (e.isCancelled()) {
|
if (e.isCancelled()) {
|
||||||
return false;
|
return false;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren