From c86eb6a19ceaf438678db19bfb003630fd5b92c3 Mon Sep 17 00:00:00 2001 From: tastybento Date: Mon, 8 Apr 2024 22:11:52 -0700 Subject: [PATCH] Make sure it's the user's island that the target is being kicked from --- .../api/commands/island/team/IslandTeamKickCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamKickCommand.java b/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamKickCommand.java index a9fbad126..a3e1c0b8b 100644 --- a/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamKickCommand.java +++ b/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamKickCommand.java @@ -95,7 +95,7 @@ public class IslandTeamKickCommand extends ConfirmableCommand { return false; } User target = User.getInstance(targetUUID); - Island oldIsland = Objects.requireNonNull(getIslands().getIsland(getWorld(), targetUUID)); // Should never be + Island oldIsland = Objects.requireNonNull(getIslands().getIsland(getWorld(), user)); // Should never be // null because of // checks above // Fire event