mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-25 01:21:21 +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) {
|
private void kick(User user, UUID targetUUID) {
|
||||||
User target = User.getInstance(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
|
// Fire event
|
||||||
IslandBaseEvent event = TeamEvent.builder()
|
IslandBaseEvent event = TeamEvent.builder()
|
||||||
.island(oldIsland)
|
.island(oldIsland)
|
||||||
|
Loading…
Reference in New Issue
Block a user