Class SocialChannelPreSwitch
java.lang.Object
ovh.mythmc.social.api.callback.channel.SocialChannelPreSwitch
Event fired before a
SocialUser switches their main ChatChannel.
This event allows for modification or cancellation before the user's main channel is switched. If the event is cancelled, the user will not be switched to the new channel.
For the non-cancellable event fired after the user switches, see SocialChannelPostSwitch.
Fields:
- user: The
SocialUserthat switched their main channel. - channel: The new main
ChatChannelthat the user is switching to. It can benull. - cancelled: Whether the event has been cancelled, preventing the switch from happening.
-
Constructor Summary
ConstructorsConstructorDescriptionSocialChannelPreSwitch(@NotNull SocialUser user, @Nullable ChatChannel channel) Constructs a newSocialChannelPreSwitchevent with the specified user and channel. -
Method Summary
-
Constructor Details
-
SocialChannelPreSwitch
public SocialChannelPreSwitch(@NotNull @NotNull SocialUser user, @Nullable @Nullable ChatChannel channel) Constructs a newSocialChannelPreSwitchevent with the specified user and channel.- Parameters:
user- theSocialUserwho is switching their main channelchannel- the new mainChatChannelthat the user is switching to, ornullif no channel is set
-