NPE avoid.
This commit is contained in:
parent
ec60991aeb
commit
24b7d26fbe
|
@ -75,7 +75,7 @@ public class AdminTeamDisbandCommand extends CompositeCommand {
|
||||||
island = islands.values().iterator().next();
|
island = islands.values().iterator().next();
|
||||||
}
|
}
|
||||||
// Check that the target owns the island
|
// Check that the target owns the island
|
||||||
if (!island.getOwner().equals(targetUUID)) {
|
if (island.getOwner() == null || !island.getOwner().equals(targetUUID)) {
|
||||||
user.sendMessage("general.errors.player-is-not-owner", TextVariables.NAME, args.get(0));
|
user.sendMessage("general.errors.player-is-not-owner", TextVariables.NAME, args.get(0));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue