diff --git a/src/de/jeffclan/JeffChestSort/JeffChestSortCategory.java b/src/de/jeffclan/JeffChestSort/JeffChestSortCategory.java index 2fcde9d..12973a5 100644 --- a/src/de/jeffclan/JeffChestSort/JeffChestSortCategory.java +++ b/src/de/jeffclan/JeffChestSort/JeffChestSortCategory.java @@ -15,7 +15,12 @@ public class JeffChestSortCategory { boolean asteriskBefore = false; boolean asteriskAfter = false; + //System.out.println("Checking if "+itemname + " is in cat "+name); + for(String typeMatch : typeMatches) { + + //System.out.println(" Checking if "+itemname + " matches "+typeMatch); + if(typeMatch.startsWith("*")) { asteriskBefore = true; typeMatch=typeMatch.substring(1); @@ -27,6 +32,7 @@ public class JeffChestSortCategory { if(asteriskBefore == false && asteriskAfter == false) { if(itemname.equalsIgnoreCase(typeMatch)) { + return true; } } else if(asteriskBefore == true && asteriskAfter == true) { diff --git a/src/de/jeffclan/JeffChestSort/JeffChestSortOrganizer.java b/src/de/jeffclan/JeffChestSort/JeffChestSortOrganizer.java index 820b8c0..6099d66 100644 --- a/src/de/jeffclan/JeffChestSort/JeffChestSortOrganizer.java +++ b/src/de/jeffclan/JeffChestSort/JeffChestSortOrganizer.java @@ -54,9 +54,9 @@ public class JeffChestSortOrganizer { Scanner sc = new Scanner(file); List lines = new ArrayList(); while (sc.hasNextLine()) { - if(!sc.nextLine().startsWith("#")) { + //if(!sc.nextLine().startsWith("#")) { lines.add(sc.nextLine()); - } + //} } String[] arr = lines.toArray(new String[0]); diff --git a/src/de/jeffclan/JeffChestSort/JeffChestSortPlugin.java b/src/de/jeffclan/JeffChestSort/JeffChestSortPlugin.java index 7682f6d..8cc6aab 100644 --- a/src/de/jeffclan/JeffChestSort/JeffChestSortPlugin.java +++ b/src/de/jeffclan/JeffChestSort/JeffChestSortPlugin.java @@ -30,9 +30,16 @@ public class JeffChestSortPlugin extends JavaPlugin { @Override public void onEnable() { - for(Material mat : Material.values()) { - System.out.println(mat.name().toLowerCase()); + + if(debug) { + System.out.println("======= ALL MATERIALS ======"); + for(Material mat : Material.values()) { + + System.out.println(mat.name().toLowerCase()); + } + System.out.println("============================"); } + createConfig(); saveDefaultCategories(); messages = new JeffChestSortMessages(this); diff --git a/src/de/jeffclan/utils/categories/900-valuables.default.txt b/src/de/jeffclan/utils/categories/900-valuables.default.txt index 2db06ee..5ba29b7 100644 --- a/src/de/jeffclan/utils/categories/900-valuables.default.txt +++ b/src/de/jeffclan/utils/categories/900-valuables.default.txt @@ -1,7 +1,3 @@ -# Names have to match exactly, except one exception: -# Color names HAVE to be ommited! -# Do not write white_bed, but just bed. -# Lines starting with a hashtag are ignored. diamond emerald diamond_ore diff --git a/src/de/jeffclan/utils/categories/905-tools.default.txt b/src/de/jeffclan/utils/categories/905-tools.default.txt index aa7fdc5..beb9835 100644 --- a/src/de/jeffclan/utils/categories/905-tools.default.txt +++ b/src/de/jeffclan/utils/categories/905-tools.default.txt @@ -1,23 +1,7 @@ -diamond_pickaxe -diamond_shovel -diamond_axe -diamond_hoe -iron_pickaxe -iron_shovel -iron_axe -iron_hoe -gold_pickaxe -gold_shovel -gold_axe -gold_hoe -stone_pickaxe -stone_shovel -stone_axe -stone_hoe -wooden_pickaxe -wooden_shovel -wooden_axe -wooden_hoe +pickaxe +shovel +hoe +axe flint_and_steel fishing_rod compass