NPE avoid.

This commit is contained in:
tastybento 2024-04-04 09:09:46 -07:00
parent ec60991aeb
commit 24b7d26fbe
1 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,7 @@ public class AdminTeamDisbandCommand extends CompositeCommand {
island = islands.values().iterator().next();
}
// 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));
return false;
}