mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-24 19:45:43 +01:00
Fix #getDungeonMob() NPE
This commit is contained in:
parent
612fb6828e
commit
df48257ef5
@ -707,6 +707,9 @@ public class DungeonsXL extends DREPlugin implements DungeonsAPI {
|
||||
@Override
|
||||
public DungeonMob getDungeonMob(LivingEntity entity) {
|
||||
GameWorld gameWorld = getGameWorld(entity.getWorld());
|
||||
if (gameWorld == null) {
|
||||
return null;
|
||||
}
|
||||
for (DungeonMob mob : gameWorld.getMobs()) {
|
||||
if (mob.getEntity() == entity) {
|
||||
return mob;
|
||||
|
Loading…
Reference in New Issue
Block a user