Skip to content

Commit

Permalink
Adds %[gamemode]_island_rank% placeholder #2585
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Jan 5, 2025
1 parent 9c0010e commit 7c39398
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,14 @@ public enum GameModePlaceholder {
* Returns the island's protection range as a diameter (it is therefore equivalent to twice the island protection range).
* @since 1.5.0
*/
ISLAND_PROTECTION_RANGE_DIAMETER("island_protection_range_diameter", (addon, user, island) -> island == null ? "" : String.valueOf(2 * island.getProtectionRange())),
ISLAND_PROTECTION_RANGE_DIAMETER("island_protection_range_diameter",
(addon, user, island) -> island == null ? "" : String.valueOf(2 * island.getProtectionRange())),
/**
* Get the rank the user has on their island
*/
ISLAND_RANK("island_rank",
(addon, user, island) -> island == null ? ""
: user.getTranslationOrNothing(RanksManager.getInstance().getRank(island.getRank(user)))),
/**
* Returns a comma separated list of player names that are at least TRUSTED on this island.
* @since 2.4.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public int getRankDownValue(int currentRank) {
/**
* Gets the reference to the rank name for value
* @param rank - value
* @return Reference
* @return Reference or empty string if nothing
*/
public String getRank(int rank) {
for (Entry<String, Integer> en : ranks.entrySet()) {
Expand Down

0 comments on commit 7c39398

Please sign in to comment.