Address feedback

Signed-off-by: Alexander Brandes <mc.cache@web.de>
This commit is contained in:
Alexander Brandes 2024-03-30 10:43:56 +01:00
parent 5de2744733
commit 277081231d
No known key found for this signature in database
GPG Key ID: 158F5701A6AAD00C

View File

@ -200,8 +200,9 @@ public final class PlaceholderRegistry {
this.createPlaceholder("currentplot_biome", (player, plot) -> plot.getBiomeSynchronous().toString());
this.createPlaceholder("currentplot_size", (player, plot) -> String.valueOf(plot.getConnectedPlots().size()));
this.createPlaceholder("total_grants", player -> {
final MetaDataAccess<Integer> metaDataAccess = player.accessPersistentMetaData(PlayerMetaDataKeys.PERSISTENT_GRANTED_PLOTS);
try (final MetaDataAccess<Integer> metaDataAccess = player.accessPersistentMetaData(PlayerMetaDataKeys.PERSISTENT_GRANTED_PLOTS)) {
return Integer.toString(metaDataAccess.get().orElse(0));
}
});
}