Class SocialChannelPreSwitch

java.lang.Object
ovh.mythmc.social.api.callback.channel.SocialChannelPreSwitch

public final class SocialChannelPreSwitch extends Object
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 SocialUser that switched their main channel.
  • channel: The new main ChatChannel that the user is switching to. It can be null.
  • cancelled: Whether the event has been cancelled, preventing the switch from happening.
  • Constructor Details

    • SocialChannelPreSwitch

      public SocialChannelPreSwitch(@NotNull @NotNull SocialUser user, @Nullable @Nullable ChatChannel channel)
      Constructs a new SocialChannelPreSwitch event with the specified user and channel.
      Parameters:
      user - the SocialUser who is switching their main channel
      channel - the new main ChatChannel that the user is switching to, or null if no channel is set