mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-10 02:19:30 +01:00
Ensure oldIsland is never null.
This commit is contained in:
parent
60c62a5967
commit
3a43c40634
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user