Fix players leaving an island resetting the island owner.

This commit is contained in:
Len 2024-02-17 22:54:15 +01:00
parent 333e8e9b8d
commit 0851570d16

View File

@ -25,7 +25,8 @@ public class LeaveRequest extends Request {
requester().sendRichMessage(requests().leave().accept(), placeholders());
IslandPlayer islandPlayer = IslandPlayer.getIslandPlayer(requester().getUniqueId());
Island island = Island.getIsland(islandPlayer.islandUUID());
island.owner(Island.NILL_UUID);
if (islandPlayer.islandOwner())
island.owner(Island.NILL_UUID);
islandPlayer.islandId(0);
islandPlayer.islandUUID(null);
World world = Bukkit.getWorlds().get(0);