Skip to content

Commit

Permalink
check the material if the statistic is block type
Browse files Browse the repository at this point in the history
  • Loading branch information
HSGamer committed Oct 29, 2024
1 parent bf067f7 commit b1ac221
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public CompletableFuture<Optional<Double>> getValue(UUID uuid) {

switch (statistic.getType()) {
case BLOCK:
return Optional.ofNullable(material).filter(Material::isBlock).map(m -> (double) player.getStatistic(statistic, m));
case ITEM:
return Optional.ofNullable(material).map(m -> (double) player.getStatistic(statistic, m));
case ENTITY:
Expand Down

0 comments on commit b1ac221

Please sign in to comment.