From cd06e737e191d5e627dcf671feacd55ce30ffefa Mon Sep 17 00:00:00 2001 From: Josh Roy <10731363+JRoy@users.noreply.github.com> Date: Mon, 21 Oct 2024 06:36:35 -0400 Subject: [PATCH] Fix error message during warp sign creation (#5956) Fixes #5954 --- .../main/java/com/earth2me/essentials/signs/SignWarp.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Essentials/src/main/java/com/earth2me/essentials/signs/SignWarp.java b/Essentials/src/main/java/com/earth2me/essentials/signs/SignWarp.java index edb64f66e..3f806811e 100644 --- a/Essentials/src/main/java/com/earth2me/essentials/signs/SignWarp.java +++ b/Essentials/src/main/java/com/earth2me/essentials/signs/SignWarp.java @@ -4,6 +4,7 @@ import com.earth2me.essentials.ChargeException; import com.earth2me.essentials.Trade; import com.earth2me.essentials.User; import net.ess3.api.IEssentials; +import net.ess3.api.TranslatableException; import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; import java.util.concurrent.CompletableFuture; @@ -25,6 +26,10 @@ public class SignWarp extends EssentialsSign { try { ess.getWarps().getWarp(warpName); } catch (final Exception ex) { + if (ex instanceof TranslatableException) { + final TranslatableException te = (TranslatableException) ex; + throw new SignException(ex, te.getTlKey(), te.getArgs()); + } throw new SignException(ex, "errorWithMessage", ex.getMessage()); } final String group = sign.getLine(2);