From 94114c65e176459b12bbb1b92901093db55a0379 Mon Sep 17 00:00:00 2001 From: tastybento Date: Sat, 17 Aug 2019 10:28:50 -0700 Subject: [PATCH] Fixes reporting of world-specific block values in console --- .../bentobox/level/calculators/CalcIslandLevel.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/main/java/world/bentobox/level/calculators/CalcIslandLevel.java b/src/main/java/world/bentobox/level/calculators/CalcIslandLevel.java index 0a05fa1..30ba3a0 100644 --- a/src/main/java/world/bentobox/level/calculators/CalcIslandLevel.java +++ b/src/main/java/world/bentobox/level/calculators/CalcIslandLevel.java @@ -330,15 +330,12 @@ public class CalcIslandLevel { for (Entry en : entriesSortedByCount) { Material type = en.getElement(); - int value = 0; - if (addon.getSettings().getBlockValues().containsKey(type)) { - // Specific - value = addon.getSettings().getBlockValues().get(type); + int value = getValue(type); + + r.add(type.toString() + ":" + + String.format("%,d", en.getCount()) + " blocks x " + value + " = " + (value * en.getCount())); + total += (value * en.getCount()); - r.add(type.toString() + ":" - + String.format("%,d", en.getCount()) + " blocks x " + value + " = " + (value * en.getCount())); - total += (value * en.getCount()); - } } r.add("Subtotal = " + total); r.add(LINE_BREAK);