Skip to content

Commit

Permalink
Potential Fix for AutoBazaar and AutoSprayonator Infinite Loop
Browse files Browse the repository at this point in the history
  • Loading branch information
May2Beez authored Dec 24, 2023
2 parents e5d9b0b + b95ef94 commit 7901498
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public void onChatReceive(ClientChatReceivedEvent event) {
if (event.type != 0 || !this.enabled) return;
if (event.message == null) return;

String message = StringUtils.stripControlCodes(event.message.getUnformattedTextForChat());
String message = StringUtils.stripControlCodes(event.message.getUnformattedText());
String boughtMessage = String.format("[Bazaar] Bought %dx %s for", this.buyAmount, this.itemToBuy);

if (message.startsWith(boughtMessage) && this.buyState == BuyState.BUY_VERIFY) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public void onChatReceive(ClientChatReceivedEvent event) {
if (event.type != 0 || !this.enabled) return;
if (event.message == null) return;

String message = StringUtils.stripControlCodes(event.message.getUnformattedTextForChat());
String message = StringUtils.stripControlCodes(event.message.getUnformattedText());
if (message.startsWith("SPRAYONATOR! Your selected material is now ") && this.sprayState == SprayState.SPRAYONATOR_TYPE_VERIFY) {
log("Sprayonator Material Changed");
String itemName = SPRAYONATOR_ITEM[FarmHelperConfig.autoSprayonatorType];
Expand Down

0 comments on commit 7901498

Please sign in to comment.