CommandBlocker ignore case
This commit is contained in:
parent
58742ee775
commit
64eda8f1bd
2 changed files with 2 additions and 2 deletions
|
@ -5,7 +5,7 @@ import java.util.regex.Pattern;
|
||||||
public class RegexpBlockEntry implements ICmdBlockEntry {
|
public class RegexpBlockEntry implements ICmdBlockEntry {
|
||||||
private Pattern rx;
|
private Pattern rx;
|
||||||
public RegexpBlockEntry(String regex) {
|
public RegexpBlockEntry(String regex) {
|
||||||
rx = Pattern.compile(regex);
|
rx = Pattern.compile(regex, Pattern.CASE_INSENSITIVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -8,7 +8,7 @@ public class StringBlockEntry implements ICmdBlockEntry {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean test(String cmd) {
|
public boolean test(String cmd) {
|
||||||
return cmd.startsWith(this.str);
|
return cmd.toLowerCase().startsWith(this.str.toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
|
Loading…
Reference in a new issue