Browse Source

Null check added to releaseAllMines.

master
MagicBot 2 years ago
parent
commit
14adea8b2e
  1. 4
      src/engine/objects/Mine.java

4
src/engine/objects/Mine.java

@ -130,8 +130,12 @@ public class Mine extends AbstractGameObject {
public static void releaseMineClaims(PlayerCharacter playerCharacter) { public static void releaseMineClaims(PlayerCharacter playerCharacter) {
if (playerCharacter == null)
return;
for (Mine mine : Mine.getMines()) { for (Mine mine : Mine.getMines()) {
if (mine.lastClaimer != null)
if (mine.lastClaimer.equals(playerCharacter)) { if (mine.lastClaimer.equals(playerCharacter)) {
mine.lastClaimer = null; mine.lastClaimer = null;
mine.updateGuildOwner(null); mine.updateGuildOwner(null);

Loading…
Cancel
Save