Check for null

This commit is contained in:
Trent Hensler 2018-03-02 10:55:52 -08:00
parent acc41bf07a
commit 6af634d4e3
1 changed files with 6 additions and 1 deletions

View File

@ -113,6 +113,11 @@ public abstract class MemoryFPlayer implements FPlayer {
} }
public Role getRole() { public Role getRole() {
// Hack to fix null roles..
if (role == null) {
this.role = Role.NORMAL;
}
return this.role; return this.role;
} }
@ -776,7 +781,7 @@ public abstract class MemoryFPlayer implements FPlayer {
return attemptClaim(forFaction, new FLocation(location), notifyFailure); return attemptClaim(forFaction, new FLocation(location), notifyFailure);
} }
public boolean attemptClaim(Faction forFaction, FLocation flocation, boolean notifyFailure) { public boolean attemptClaim(Faction forFaction, FLocation flocation, boolean notifyFailure) {
// notifyFailure is false if called by auto-claim; no need to notify on every failure for it // notifyFailure is false if called by auto-claim; no need to notify on every failure for it
// return value is false on failure, true on success // return value is false on failure, true on success