CommandBlocker ignore case

This commit is contained in:
Jascha Starke 2013-09-15 15:04:59 +02:00
parent 58742ee775
commit 64eda8f1bd
2 changed files with 2 additions and 2 deletions

View file

@ -5,7 +5,7 @@ import java.util.regex.Pattern;
public class RegexpBlockEntry implements ICmdBlockEntry {
private Pattern rx;
public RegexpBlockEntry(String regex) {
rx = Pattern.compile(regex);
rx = Pattern.compile(regex, Pattern.CASE_INSENSITIVE);
}
@Override

View file

@ -8,7 +8,7 @@ public class StringBlockEntry implements ICmdBlockEntry {
@Override
public boolean test(String cmd) {
return cmd.startsWith(this.str);
return cmd.toLowerCase().startsWith(this.str.toLowerCase());
}
public String toString() {