Fixed NPE on MobType.get

Signed-off-by: Grafe <flingelfrank@hotmail.com>
This commit is contained in:
Grafe 2013-03-05 00:28:58 +01:00
parent c6a403c7b5
commit 5317da864a

View File

@ -227,10 +227,13 @@ public class DMobType {
return mobType;
}
}
for(DMobType mobType:P.p.mainConfig.defaultDungeon.getMobTypes()){
if(mobType.name.equalsIgnoreCase(name)){
return mobType;
}
if(P.p.mainConfig.defaultDungeon!=null){
for(DMobType mobType:P.p.mainConfig.defaultDungeon.getMobTypes()){
if(mobType.name.equalsIgnoreCase(name)){
return mobType;
}
}
}
return null;