diff --git a/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamSetownerCommand.java b/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamSetownerCommand.java index 5383cdfee..680802034 100644 --- a/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamSetownerCommand.java +++ b/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamSetownerCommand.java @@ -95,7 +95,7 @@ public boolean execute(User user, String label, List args) { .involvedPlayer(user.getUniqueId()) .admin(false) .reason(IslandEvent.Reason.RANK_CHANGE) - .rankChange(RanksManager.OWNER_RANK, RanksManager.VISITOR_RANK) + .rankChange(RanksManager.OWNER_RANK, RanksManager.SUB_OWNER_RANK) .build(); getIslands().save(island); return true; @@ -107,4 +107,4 @@ public Optional> tabComplete(User user, String alias, List return Optional.of(Util.tabLimit(getIslands().getMembers(getWorld(), user.getUniqueId()).stream().map(getPlayers()::getName).toList(), lastArg)); } -} \ No newline at end of file +} diff --git a/src/main/java/world/bentobox/bentobox/managers/IslandsManager.java b/src/main/java/world/bentobox/bentobox/managers/IslandsManager.java index 6554c0d80..087f6bfb4 100644 --- a/src/main/java/world/bentobox/bentobox/managers/IslandsManager.java +++ b/src/main/java/world/bentobox/bentobox/managers/IslandsManager.java @@ -1520,8 +1520,8 @@ public void setOwner(World world, User user, UUID targetUUID) { */ public void setOwner(User user, UUID targetUUID, Island island) { islandCache.setOwner(island, targetUUID); - // Remove the old owner from the island - plugin.getIslands().removePlayer(island, user.getUniqueId()); + // Set old owner as sub-owner on island. + island.setRank(user, RanksManager.SUB_OWNER_RANK); user.sendMessage("commands.island.team.setowner.name-is-the-owner", "[name]", plugin.getPlayers().getName(targetUUID)); plugin.getIWM().getAddon(island.getWorld()).ifPresent(addon -> {