mirror of
https://github.com/kiranhart/Auction-House.git
synced 2025-01-23 15:21:20 +01:00
parent
5e603d7c79
commit
cc5d8e934a
@ -333,7 +333,8 @@ public class AuctionAPI {
|
||||
}
|
||||
|
||||
public boolean matchSearch(String pattern, String sentence) {
|
||||
Pattern patt = Pattern.compile(ChatColor.stripColor(pattern), Pattern.CASE_INSENSITIVE);
|
||||
String escapedPattern = Pattern.quote(ChatColor.stripColor(pattern));
|
||||
Pattern patt = Pattern.compile(escapedPattern, Pattern.CASE_INSENSITIVE);
|
||||
Matcher matcher = patt.matcher(sentence);
|
||||
return matcher.find();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user