Class InteractionResult
java.lang.Object
io.github.thebusybiscuit.slimefun4.core.attributes.interactions.InteractionResult
- Direct Known Subclasses:
ItemInteractionResult
This class represents the result of an interaction on an
ExternallyInteractable
item.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the custom result message for this result or null if not set.boolean
Returns whether this result has a result message or is null.boolean
Returns whether the interaction was successful or not.void
setResultMessage
(String resultMessage) Sets a custom result message for this interaction.
-
Constructor Details
-
InteractionResult
@ParametersAreNonnullByDefault public InteractionResult(boolean successful) Creates a new InteractionResult.- Parameters:
successful
- Whether the interaction was successful or not.
-
-
Method Details
-
isInteractionSuccessful
public boolean isInteractionSuccessful()Returns whether the interaction was successful or not.- Returns:
- boolean denoting whether the interaction was successful or not.
-
setResultMessage
Sets a custom result message for this interaction.- Parameters:
resultMessage
- The message to be sent with the Result
-
hasResultMessage
public boolean hasResultMessage()Returns whether this result has a result message or is null.- Returns:
- true if a result message is present
-
getResultMessage
Returns the custom result message for this result or null if not set.- Returns:
- A String of the provided custom result message.
-