mirror of
https://github.com/JEFF-Media-GbR/ChestSort.git
synced 2024-12-12 04:17:44 +01:00
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:
parent
d233cc7f73
commit
b187ec0038
@ -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
|
// Checks whether a the given itemname fits into this category and returns the line number. 0 means not found
|
||||||
short matches(String itemname) {
|
short matches(String itemname) {
|
||||||
|
|
||||||
boolean asteriskBefore = false;
|
|
||||||
boolean asteriskAfter = false;
|
|
||||||
|
|
||||||
// Very, very simple wildcard checks
|
// Very, very simple wildcard checks
|
||||||
for (TypeMatchPositionPair typeMatchPositionPair : typeMatches) {
|
for (TypeMatchPositionPair typeMatchPositionPair : typeMatches) {
|
||||||
|
|
||||||
|
boolean asteriskBefore = false;
|
||||||
|
boolean asteriskAfter = false;
|
||||||
|
|
||||||
String typeMatch = typeMatchPositionPair.getTypeMatch();
|
String typeMatch = typeMatchPositionPair.getTypeMatch();
|
||||||
if (typeMatch.startsWith("*")) {
|
if (typeMatch.startsWith("*")) {
|
||||||
asteriskBefore = true;
|
asteriskBefore = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user