Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-20 21:40:06 +01:00
Fixed several NPEs within World. Thanks Deaygo!
Dieser Commit ist enthalten in:
Ursprung
68695fb9d6
Commit
b0fcbe7fca
@ -1051,6 +1051,11 @@ public class World implements IBlockAccess {
|
|||||||
|
|
||||||
for (i = 0; i < this.e.size(); ++i) {
|
for (i = 0; i < this.e.size(); ++i) {
|
||||||
entity = (Entity) this.e.get(i);
|
entity = (Entity) this.e.get(i);
|
||||||
|
// CraftBukkit start - fixed an NPE
|
||||||
|
if (entity == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// CraftBukkit end
|
||||||
entity.o_();
|
entity.o_();
|
||||||
if (entity.dead) {
|
if (entity.dead) {
|
||||||
this.e.remove(i--);
|
this.e.remove(i--);
|
||||||
@ -1971,7 +1976,11 @@ public class World implements IBlockAccess {
|
|||||||
Entity entity = null;
|
Entity entity = null;
|
||||||
for (int i = 0; i < list.size(); ++i) {
|
for (int i = 0; i < list.size(); ++i) {
|
||||||
entity = (Entity) list.get(i);
|
entity = (Entity) list.get(i);
|
||||||
|
// CraftBukkit start - fixed an NPE
|
||||||
|
if (entity == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// CraftBukkit end
|
||||||
this.entityList.add(entity);
|
this.entityList.add(entity);
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
this.c((Entity) list.get(i));
|
this.c((Entity) list.get(i));
|
||||||
@ -2078,6 +2087,11 @@ public class World implements IBlockAccess {
|
|||||||
|
|
||||||
for (int i = 0; i < this.players.size(); ++i) {
|
for (int i = 0; i < this.players.size(); ++i) {
|
||||||
EntityHuman entityhuman1 = (EntityHuman) this.players.get(i);
|
EntityHuman entityhuman1 = (EntityHuman) this.players.get(i);
|
||||||
|
// CraftBukkit start - fixed an NPE
|
||||||
|
if (entityhuman1 == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// CraftBukkit end
|
||||||
double d5 = entityhuman1.d(d0, d1, d2);
|
double d5 = entityhuman1.d(d0, d1, d2);
|
||||||
|
|
||||||
if ((d3 < 0.0D || d5 < d3 * d3) && (d4 == -1.0D || d5 < d4)) {
|
if ((d3 < 0.0D || d5 < d3 * d3) && (d4 == -1.0D || d5 < d4)) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren