From fdd8b7f894cf2aaa55d0f3cc1b9d884543b1ae28 Mon Sep 17 00:00:00 2001 From: tastybento Date: Wed, 23 Oct 2024 14:35:18 -0700 Subject: [PATCH] Fix test --- src/test/java/world/bentobox/bentobox/AbstractCommonSetup.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/world/bentobox/bentobox/AbstractCommonSetup.java b/src/test/java/world/bentobox/bentobox/AbstractCommonSetup.java index 11adee0ad..d81205f35 100644 --- a/src/test/java/world/bentobox/bentobox/AbstractCommonSetup.java +++ b/src/test/java/world/bentobox/bentobox/AbstractCommonSetup.java @@ -280,7 +280,7 @@ public abstract class AbstractCommonSetup { List capturedMessages = captor.getAllValues(); // Count the number of occurrences of the expectedMessage in the captured messages - long actualOccurrences = capturedMessages.stream().map(component -> component.toPlainText()) // Convert each TextComponent to plain text + long actualOccurrences = capturedMessages.stream().map(component -> component.toLegacyText()) // Convert each TextComponent to plain text .filter(messageText -> messageText.contains(expectedMessage)) // Check if the message contains the expected text .count(); // Count how many times the expected message appears