Skip to content

Commit

Permalink
Fix: helmets are given incorrectly
Browse files Browse the repository at this point in the history
  • Loading branch information
iceBear67 committed Oct 16, 2024
1 parent 15a664e commit c7fd058
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/dev/tylerm/khs/configuration/Items.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@

import java.util.ArrayList;
import java.util.List;
import java.util.function.Predicate;
import java.util.regex.Pattern;

public class Items {

private static final Predicate<String> INT = Pattern.compile("[0-9]+").asPredicate();
public static List<ItemStack> HIDER_ITEMS, SEEKER_ITEMS;
public static ItemStack
HIDER_HELM, SEEKER_HELM,
Expand All @@ -33,6 +35,7 @@ public static void loadItems() {

ConfigurationSection SeekerItems = manager.getConfigurationSection("items.seeker");
for (String key : SeekerItems.getKeys(false)) {
if(!INT.test(key)) continue;
ConfigurationSection section = SeekerItems.getConfigurationSection(key);
if (section == null) {
SEEKER_ITEMS.add(null);
Expand Down Expand Up @@ -82,6 +85,7 @@ public static void loadItems() {

ConfigurationSection HiderItems = manager.getConfigurationSection("items.hider");
for (String key : HiderItems.getKeys(false)) {
if(!INT.test(key)) continue;
ConfigurationSection section = HiderItems.getConfigurationSection(key);
if (section == null) {
HIDER_ITEMS.add(null);
Expand Down

0 comments on commit c7fd058

Please sign in to comment.