mirror of
https://github.com/JEFF-Media-GbR/ChestSort.git
synced 2025-01-06 00:17:52 +01:00
fixed category getter
This commit is contained in:
parent
37dfc3ca85
commit
9c8acdd3ff
@ -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) {
|
||||
|
@ -54,9 +54,9 @@ public class JeffChestSortOrganizer {
|
||||
Scanner sc = new Scanner(file);
|
||||
List<String> lines = new ArrayList<String>();
|
||||
while (sc.hasNextLine()) {
|
||||
if(!sc.nextLine().startsWith("#")) {
|
||||
//if(!sc.nextLine().startsWith("#")) {
|
||||
lines.add(sc.nextLine());
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
String[] arr = lines.toArray(new String[0]);
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user