mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-02 21:22:05 -07:00
add null check to getEntity API
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user