Package net.kyori.adventure.util
Interface ComponentMessageThrowable
-
public interface ComponentMessageThrowable
An extension interface forThrowable
s to provide aComponent
-based message.- Since:
- 4.0.0
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description @Nullable Component
componentMessage()
Gets the message.static @Nullable Component
getMessage(@Nullable java.lang.Throwable throwable)
Gets theComponent
-based message from aThrowable
, if available.static @Nullable Component
getOrConvertMessage(@Nullable java.lang.Throwable throwable)
-
-
-
Method Detail
-
getMessage
@Nullable static @Nullable Component getMessage(@Nullable @Nullable java.lang.Throwable throwable)
Gets theComponent
-based message from aThrowable
, if available.- Parameters:
throwable
- the throwable- Returns:
- the message
- Since:
- 4.0.0
-
getOrConvertMessage
@Nullable static @Nullable Component getOrConvertMessage(@Nullable @Nullable java.lang.Throwable throwable)
- Parameters:
throwable
- the throwable- Returns:
- the message
- Since:
- 4.0.0
-
componentMessage
@Nullable @Nullable Component componentMessage()
Gets the message.- Returns:
- the message
- Since:
- 4.0.0
-
-