unify item arrays & date formats

This commit is contained in:
hyperdefined
2022-03-01 23:32:30 -05:00
parent 61cf44a407
commit b9907eedec
10 changed files with 46 additions and 46 deletions

View File

@@ -36,7 +36,6 @@ import java.util.List;
public class BlocksMined implements Listener {
private final ToolStats toolStats;
private final String[] validTools = {"pickaxe", "axe", "hoe", "shovel", "shear"};
public BlocksMined(ToolStats toolStats) {
this.toolStats = toolStats;
@@ -59,7 +58,7 @@ public class BlocksMined implements Listener {
}
// only check certain items
String itemName = heldItem.getType().toString().toLowerCase();
if (Arrays.stream(validTools).noneMatch(itemName::contains)) {
if (Arrays.stream(toolStats.mineItems).noneMatch(itemName::contains)) {
return;
}
// if it's an item we want, update the stats