Skip to content

Commit

Permalink
Fixed errors when getting position placeholder for a player without a…
Browse files Browse the repository at this point in the history
…n island (#1109)
  • Loading branch information
OmerBenGera committed May 7, 2022
1 parent 23577a8 commit c2ae294
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -392,7 +392,7 @@ private static Optional<String> handleTopIslandsPlaceholder(@Nullable Island isl
String placeholderValue = matcher.group(1);

if (placeholderValue.equals("position"))
return Optional.of((plugin.getGrid().getIslandPosition(island, sortingType) + 1) + "");
return island == null ? Optional.empty() : Optional.of((plugin.getGrid().getIslandPosition(island, sortingType) + 1) + "");

Function<Island, String> getValueFunction;

Expand Down

0 comments on commit c2ae294

Please sign in to comment.