Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<!-- Do not change unless you want different name for local builds. -->
<build.number>-LOCAL</build.number>
<!-- This allows to change between versions. -->
<build.version>2.21.4</build.version>
<build.version>2.21.5</build.version>
<sonar.projectKey>BentoBoxWorld_Level</sonar.projectKey>
<sonar.organization>bentobox-world</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/world/bentobox/level/config/BlockConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public BlockConfig(Level addon, YamlConfiguration blockValuesConfig, File file)
// Validate
if (isMaterial(key) || isSpawner(key) || isOther(key)) {
// Store for lookup
this.blockValues.put(key, blocks.getInt(key));
this.blockValues.put(key.toLowerCase(Locale.ENGLISH), blocks.getInt(key));
} else {
addon.logError("Unknown listing in blocks section: " + key);
}
Expand Down
13 changes: 3 additions & 10 deletions src/main/java/world/bentobox/level/panels/DetailsPanel.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
package world.bentobox.level.panels;

import java.io.File;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.EnumMap;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.*;
import java.util.stream.Collectors;

import org.bukkit.Material;
Expand Down Expand Up @@ -286,9 +279,9 @@ private void updateFilters() {
int o2Count = blockLimit > 0 ? Math.min(o2.value(), blockLimit) : o2.value();

long o1Value = (long) o1Count
* this.addon.getBlockConfig().getBlockValues().getOrDefault(o1.key(), 0);
* this.addon.getBlockConfig().getBlockValues().getOrDefault(o1.key().toString().toLowerCase(Locale.ENGLISH), 0);
long o2Value = (long) o2Count
* this.addon.getBlockConfig().getBlockValues().getOrDefault(o2.key(), 0);
* this.addon.getBlockConfig().getBlockValues().getOrDefault(o2.key().toString().toLowerCase(Locale.ENGLISH), 0);

if (o1Value == o2Value) {
String o1Name = Utils.prettifyObject(o1.key(), this.user);
Expand Down