Fix repair sign translation error (#5967)

Fixes #5964
This commit is contained in:
Josh Roy 2024-11-10 22:41:29 -05:00 committed by GitHub
parent 0b49421bad
commit 2ac37d8dd4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,6 +6,7 @@ import com.earth2me.essentials.User;
import com.earth2me.essentials.commands.Commandrepair; import com.earth2me.essentials.commands.Commandrepair;
import com.earth2me.essentials.commands.NotEnoughArgumentsException; import com.earth2me.essentials.commands.NotEnoughArgumentsException;
import net.ess3.api.IEssentials; import net.ess3.api.IEssentials;
import net.ess3.api.TranslatableException;
public class SignRepair extends EssentialsSign { public class SignRepair extends EssentialsSign {
public SignRepair() { public SignRepair() {
@ -42,6 +43,8 @@ public class SignRepair extends EssentialsSign {
throw new NotEnoughArgumentsException(); throw new NotEnoughArgumentsException();
} }
} catch (final TranslatableException ex) {
throw new SignException(ex.getTlKey(), ex.getArgs());
} catch (final Exception ex) { } catch (final Exception ex) {
throw new SignException(ex, "errorWithMessage", ex.getMessage()); throw new SignException(ex, "errorWithMessage", ex.getMessage());
} }