Send exception message and remove crash() call

This commit is contained in:
JeremyStar™ 2024-04-30 21:51:28 +02:00
parent f13d9bcfb8
commit add5db8fc0
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -20,6 +20,7 @@ package de.pickshadow.plugin.commands;
import de.pickshadow.plugin.classes.CommandBase;
import de.pickshadow.plugin.base.Translation;
import de.pickshadow.plugin.classes.Types;
import de.pickshadow.plugin.utils.Miscellaneous;
import de.pickshadow.plugin.utils.TabCompletionHelper;
import net.kyori.adventure.text.Component;
@ -70,7 +71,8 @@ public class SystemInformationCommand extends CommandBase {
sender.sendMessage(Objects.requireNonNull(getMessage(2)));
break;
default:
logger.crash("Invalid label \"" + label + "\"");
sender.sendMessage(Miscellaneous.format(Translation.GLOBAL_EXCEPTION, Types.FormatType.ERROR));
logger.error("Invalid label \"" + label + "\"");
break;
}
return true;