From 6a3bf07946ecb67b37ae293a80df1423085b402d Mon Sep 17 00:00:00 2001 From: Evan <evanmccarthy@outlook.com> Date: Sat, 11 Jun 2022 02:37:00 -0500 Subject: [PATCH] correct argument check in PlayerHandshakeEvent#setFailMessage(String) (#7940) --- .../Add-handshake-event-to-allow-plugins-to-handle-clien.patch | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/patches/api/Add-handshake-event-to-allow-plugins-to-handle-clien.patch b/patches/api/Add-handshake-event-to-allow-plugins-to-handle-clien.patch index b0b6eae3c8..43714cf59f 100644 --- a/patches/api/Add-handshake-event-to-allow-plugins-to-handle-clien.patch +++ b/patches/api/Add-handshake-event-to-allow-plugins-to-handle-clien.patch @@ -17,7 +17,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.format.NamedTextColor; +import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; -+import org.apache.commons.lang3.Validate; +import org.bukkit.event.Cancellable; +import org.bukkit.event.Event; +import org.bukkit.event.HandlerList; @@ -274,7 +273,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + */ + @Deprecated + public void setFailMessage(@NotNull String failMessage) { -+ Preconditions.checkArgument(failMessage != null && failMessage.isEmpty(), "fail message cannot be null or empty"); ++ Preconditions.checkArgument(failMessage != null && !failMessage.isEmpty(), "fail message cannot be null or empty"); + this.failMessage(LegacyComponentSerializer.legacySection().deserialize(failMessage)); + } +