mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-02-18 21:32:04 +01:00
Adjust null check.
This commit is contained in:
parent
3784d5d28d
commit
e8acd05dbe
@ -3,6 +3,7 @@ package world.bentobox.bentobox.api.commands.admin;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@ -81,9 +82,8 @@ public class AdminUnregisterCommand extends ConfirmableCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean execute(User user, String label, List<String> args) {
|
public boolean execute(User user, String label, List<String> args) {
|
||||||
if (targetIsland == null || targetUUID == null) {
|
Objects.requireNonNull(targetIsland);
|
||||||
return true;
|
Objects.requireNonNull(targetUUID);
|
||||||
}
|
|
||||||
// Everything's fine, we can set the island as spawn :)
|
// Everything's fine, we can set the island as spawn :)
|
||||||
askConfirmation(user, () -> unregisterIsland(user));
|
askConfirmation(user, () -> unregisterIsland(user));
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user