Record Class SocialChannelPostSwitch
java.lang.Object
java.lang.Record
ovh.mythmc.social.api.callback.channel.SocialChannelPostSwitch
- Record Components:
user- theSocialUserthat switched their main channelpreviousChannel- the user's previous mainChatChannelchannel- the user's new mainChatChannel
public record SocialChannelPostSwitch(SocialUser user, ChatChannel previousChannel, ChatChannel channel)
extends Record
Event fired after a
SocialUser switches their main ChatChannel.
For the cancellable event fired before the user switches, see
SocialChannelPreSwitch.
-
Constructor Summary
ConstructorsConstructorDescriptionSocialChannelPostSwitch(SocialUser user, ChatChannel previousChannel, ChatChannel channel) Creates an instance of aSocialChannelPostSwitchrecord class. -
Method Summary
Modifier and TypeMethodDescriptionchannel()Returns the value of thechannelrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thepreviousChannelrecord component.final StringtoString()Returns a string representation of this record class.user()Returns the value of theuserrecord component.
-
Constructor Details
-
SocialChannelPostSwitch
Creates an instance of aSocialChannelPostSwitchrecord class.- Parameters:
user- the value for theuserrecord componentpreviousChannel- the value for thepreviousChannelrecord componentchannel- the value for thechannelrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
user
Returns the value of theuserrecord component.- Returns:
- the value of the
userrecord component
-
previousChannel
Returns the value of thepreviousChannelrecord component.- Returns:
- the value of the
previousChannelrecord component
-
channel
Returns the value of thechannelrecord component.- Returns:
- the value of the
channelrecord component
-