Contents
Class GeneralCommandException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.hypixel.hytale.server.core.command.system.exceptions.CommandException
com.hypixel.hytale.server.core.command.system.exceptions.GeneralCommandException
- All Implemented Interfaces:
Serializable
A general command exception that can be used for any error message.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGeneralCommandException(Message message) Default Constructor for aGeneralCommandExceptioninstance. -
Method Summary
Modifier and TypeMethodDescriptionGets the message text from this exception.voidsendTranslatedMessage(CommandSender sender) Sends a translated message to the given sender.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
GeneralCommandException
Default Constructor for aGeneralCommandExceptioninstance.- Parameters:
message- The message associated with this exception.
-
-
Method Details
-
sendTranslatedMessage
Description copied from class:CommandExceptionSends a translated message to the given sender.- Specified by:
sendTranslatedMessagein classCommandException- Parameters:
sender- The sender to send the message to.
-
getMessageText
Gets the message text from this exception.- Returns:
- The message text, or null if the message cannot be converted to text.
-