Ensure oldIsland is never null.

This commit is contained in:
tastybento 2021-10-03 16:16:58 -07:00
parent 60c62a5967
commit 3a43c40634
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ public class IslandTeamKickCommand extends ConfirmableCommand {
private void kick(User user, UUID targetUUID) {
User target = User.getInstance(targetUUID);
Island oldIsland = getIslands().getIsland(getWorld(), targetUUID);
Island oldIsland = Objects.requireNonNull(getIslands().getIsland(getWorld(), targetUUID)); // Should never be null because of checks above
// Fire event
IslandBaseEvent event = TeamEvent.builder()
.island(oldIsland)