Class SocialChatRenderer.MapResult<T>
java.lang.Object
ovh.mythmc.social.api.chat.renderer.SocialChatRenderer.MapResult<T>
- Type Parameters:
T- the renderer target type
- Enclosing interface:
SocialChatRenderer<T>
Represents the outcome of mapping an
Audience to a renderer target.
Use success(Object) when mapping succeeded, ignore() to
silently
skip rendering without logging (e.g. the audience is not a player), or
failure(String) internally when something unexpected went wrong.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> ovh.mythmc.social.api.chat.renderer.SocialChatRenderer.MapResult.Ignore<T> ignore()Creates an ignore result; rendering is skipped silently.booleanReturnstrueif this result represents a mapping failure that should be logged.booleanReturnstrueif this result represents a silent skip.booleanReturnstrueif this result represents a successful mapping.abstract Tresult()Returns the mapped target, ornullfor ignore/failure results.static <T> ovh.mythmc.social.api.chat.renderer.SocialChatRenderer.MapResult.Success<T> success(T result) Creates a successful mapping result.
-
Constructor Details
-
MapResult
public MapResult()
-
-
Method Details
-
result
Returns the mapped target, ornullfor ignore/failure results. -
success
public static <T> ovh.mythmc.social.api.chat.renderer.SocialChatRenderer.MapResult.Success<T> success(T result) Creates a successful mapping result.- Type Parameters:
T- the target type- Parameters:
result- the mapped target- Returns:
- a success result
-
ignore
public static <T> ovh.mythmc.social.api.chat.renderer.SocialChatRenderer.MapResult.Ignore<T> ignore()Creates an ignore result; rendering is skipped silently.- Type Parameters:
T- the target type- Returns:
- an ignore result
-
isSuccess
public boolean isSuccess()Returnstrueif this result represents a successful mapping. -
isIgnored
public boolean isIgnored()Returnstrueif this result represents a silent skip. -
isFailure
public boolean isFailure()Returnstrueif this result represents a mapping failure that should be logged.
-