mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-21 07:50:52 +01:00
SPIGOT-7532: Entity#isValid() returns false after server restart
By: Jishuna <joshl5324@gmail.com>
This commit is contained in:
parent
5690a0ab1f
commit
bf7ca9b824
1 changed files with 3 additions and 13 deletions
|
@ -593,26 +593,16 @@
|
|||
}
|
||||
|
||||
@Override
|
||||
@@ -1737,7 +1953,9 @@
|
||||
|
||||
a() {}
|
||||
|
||||
- public void onCreated(Entity entity) {}
|
||||
+ public void onCreated(Entity entity) {
|
||||
+ entity.inWorld = true; // CraftBukkit - Mark entity as in world
|
||||
+ }
|
||||
|
||||
public void onDestroyed(Entity entity) {
|
||||
WorldServer.this.getScoreboard().entityRemoved(entity);
|
||||
@@ -1785,6 +2003,7 @@
|
||||
@@ -1785,6 +2001,8 @@
|
||||
}
|
||||
|
||||
entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
|
||||
+ entity.inWorld = true; // CraftBukkit - Mark entity as in world
|
||||
+ entity.valid = true; // CraftBukkit
|
||||
}
|
||||
|
||||
public void onTrackingEnd(Entity entity) {
|
||||
@@ -1821,6 +2040,14 @@
|
||||
@@ -1821,6 +2039,14 @@
|
||||
}
|
||||
|
||||
entity.updateDynamicGameEventListener(DynamicGameEventListener::remove);
|
||||
|
|
Loading…
Add table
Reference in a new issue