mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
add null check to getEntity API
This commit is contained in:
parent
9fc220ea02
commit
4e89e1f0c7
1 changed files with 3 additions and 0 deletions
|
@ -17,6 +17,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ public Entity getEntity(UUID uuid) {
|
||||
+ Entity entity;
|
||||
+ for (WorldServer world : worldServer) {
|
||||
+ if (world == null) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ entity = world.getEntity(uuid);
|
||||
+ if (entity != null && !entity.dead) {
|
||||
+ return entity;
|
||||
|
|
Loading…
Reference in a new issue