Skip to content

Commit

Permalink
use string.matches instead of pattern matcher
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamKracker committed Dec 11, 2024
1 parent d0e12c4 commit 1f3f32f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// 1.21.3 2024-12-11T10:48:26.7384154 cookies-mod/Language (en_us)
// 1.21.3 2024-12-11T11:17:47.4766913 cookies-mod/Language (en_us)
b8e506abeadfabc1b260c9088e803802d2607fc9 assets\cookies-mod\lang\en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ private boolean handleAcceptItem(ItemStack visitorItem) {
}
var lore = String.join("\n", visitorItem.get(DataComponentTypes.LORE).lines().stream().map(Text::getString).toArray(String[]::new));

if (!lore.matches("Rewards:([\\S\\s]*)(?:Click|Missing)")) {
if (!lore.matches("[\\S\\s]*Rewards:([\\S\\s]*)(?:Click|Missing)[\\S\\s]*")) {
CookiesUtils.sendMessage("Invalid lore: " + lore);
return false;
}

Expand Down

0 comments on commit 1f3f32f

Please sign in to comment.