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