Skip to content

Commit

Permalink
Fix maxteamsize placeholders
Browse files Browse the repository at this point in the history
The placeholders were not using the correct API call and so were
reporting based on the player's permission and not the actual island's
maxteam size.

#1753
  • Loading branch information
tastybento committed May 7, 2021
1 parent 9ed0620 commit 839f05d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public enum GameModePlaceholder {
* Returns the maximum number of members the island can have
* @since 1.5.0
*/
ISLAND_MEMBERS_MAX("island_members_max", (addon, user, island) -> island == null ? "" : String.valueOf(user.getPermissionValue(addon.getPermissionPrefix() + "team.maxsize", addon.getPlugin().getIWM().getMaxTeamSize(addon.getOverWorld())))),
ISLAND_MEMBERS_MAX("island_members_max", (addon, user, island) -> island == null ? "" : String.valueOf(addon.getIslands().getMaxMembers(island, RanksManager.MEMBER_RANK))),
/**
* Returns the amount of players that are at least MEMBER on this island.
* @since 1.5.0
Expand Down Expand Up @@ -234,7 +234,8 @@ public enum GameModePlaceholder {
* @since 1.5.2
*/
VISITED_ISLAND_MEMBERS_MAX("visited_island_members_max", (addon, user, island) ->
getVisitedIsland(addon, user).map(value -> String.valueOf(user.getPermissionValue(addon.getPermissionPrefix() + "team.maxsize", addon.getPlugin().getIWM().getMaxTeamSize(addon.getOverWorld())))).orElse("")),
getVisitedIsland(addon, user).map(value -> String.valueOf(addon.getIslands().getMaxMembers(value, RanksManager.MEMBER_RANK)))
.orElse("")),
/**
* Returns a comma separated list of player names that are at least MEMBER on the island the player is standing on.
* @since 1.13.0
Expand Down

0 comments on commit 839f05d

Please sign in to comment.