Fix for faction creation sometimes causing an NPE; hopefully a fix for the cause of the null value as well, from an ID clash in the entity collection of factions
Fix for disband command causing an NPE if run from the console Additionally, disband command use is now logged
This commit is contained in:
@@ -58,6 +58,13 @@ public class CmdCreate extends FCommand
|
||||
if ( ! payForCommand(Conf.econCostCreate, "to create a new faction", "for creating a new faction")) return;
|
||||
|
||||
Faction faction = Factions.i.create();
|
||||
|
||||
if (faction == null)
|
||||
{
|
||||
msg("<b>There was an internal error while trying to create your faction. Please try again.");
|
||||
return;
|
||||
}
|
||||
|
||||
faction.setTag(tag);
|
||||
fme.setRole(Role.ADMIN);
|
||||
fme.setFaction(faction);
|
||||
|
||||
Reference in New Issue
Block a user