Avoid NPE
This commit is contained in:
parent
d6ec4ad5f0
commit
38a0b93cc3
@ -66,11 +66,14 @@ public class TypeFaction extends TypeAbstract<Faction>
|
|||||||
|
|
||||||
// MPlayer Name Exact
|
// MPlayer Name Exact
|
||||||
String id = IdUtil.getId(str);
|
String id = IdUtil.getId(str);
|
||||||
|
if (id != null)
|
||||||
|
{
|
||||||
MPlayer mplayer = MPlayerColl.get().get(id, false);
|
MPlayer mplayer = MPlayerColl.get().get(id, false);
|
||||||
if (mplayer != null)
|
if (mplayer != null)
|
||||||
{
|
{
|
||||||
return mplayer.getFaction();
|
return mplayer.getFaction();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
throw new MassiveException().addMsg("<b>No faction or player matching \"<p>%s<b>\".", str);
|
throw new MassiveException().addMsg("<b>No faction or player matching \"<p>%s<b>\".", str);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user