Update ChestSortCategory.java

Moved the asteriskBefore boolean and asteriskAfter boolean inside the for loop to prevent them being set true for the remainder of the loop due to an earlier item in the category file having asterisks.
This commit is contained in:
Richard 2021-02-17 17:43:37 +00:00 committed by GitHub
parent d233cc7f73
commit b187ec0038
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,11 +33,12 @@ public class ChestSortCategory implements Comparable<ChestSortCategory>{
// Checks whether a the given itemname fits into this category and returns the line number. 0 means not found
short matches(String itemname) {
boolean asteriskBefore = false;
boolean asteriskAfter = false;
// Very, very simple wildcard checks
for (TypeMatchPositionPair typeMatchPositionPair : typeMatches) {
boolean asteriskBefore = false;
boolean asteriskAfter = false;
String typeMatch = typeMatchPositionPair.getTypeMatch();
if (typeMatch.startsWith("*")) {
asteriskBefore = true;