Package ovh.mythmc.social.api.reaction
Class ReactionFactory
java.lang.Object
ovh.mythmc.social.api.reaction.ReactionFactory
Abstract factory for handling and displaying
Reaction instances.
A ReactionFactory is responsible for executing reactions for
specific users, including both visual and interactive effects.
Subclasses must implement the actual behavior for displaying and playing reactions according to the platform or environment.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voiddisplayReaction(@NotNull SocialUser user, @NotNull Reaction reaction) Displays a reaction to a specific user.abstract voidplay(@NotNull SocialUser user, @NotNull Reaction reaction) Plays a reaction for a specific user.
-
Constructor Details
-
ReactionFactory
public ReactionFactory()
-
-
Method Details
-
displayReaction
protected abstract void displayReaction(@NotNull @NotNull SocialUser user, @NotNull @NotNull Reaction reaction) Displays a reaction to a specific user.This method is intended to handle the visual or UI aspects of a reaction, such as showing textures, particles, or other effects.
- Parameters:
user- the user for whom the reaction is displayedreaction- the reaction to display
-
play
Plays a reaction for a specific user.This method triggers the full reaction behavior, including visual, auditory, or interactive effects, and may call
displayReaction(SocialUser, Reaction)internally.- Parameters:
user- the user who receives the reactionreaction- the reaction to play
-