Class GuildVoiceMoveEvent
- java.lang.Object
-
- net.dv8tion.jda.api.events.Event
-
- net.dv8tion.jda.api.events.guild.GenericGuildEvent
-
- net.dv8tion.jda.api.events.guild.voice.GenericGuildVoiceEvent
-
- net.dv8tion.jda.api.events.guild.voice.GuildVoiceMoveEvent
-
- All Implemented Interfaces:
GenericEvent,GuildVoiceUpdateEvent,UpdateEvent<Member,VoiceChannel>
public class GuildVoiceMoveEvent extends GenericGuildVoiceEvent
Indicates that aMembermoves betweenVoiceChannels.When the
Memberis leaving aGuildVoiceLeaveEventis fired insteadCan be used to detect when a member moves from one voice channel to another in the same guild.
- See Also:
GuildVoiceUpdateEvent
-
-
Field Summary
-
Fields inherited from interface net.dv8tion.jda.api.events.guild.voice.GuildVoiceUpdateEvent
IDENTIFIER
-
-
Constructor Summary
Constructors Constructor Description GuildVoiceMoveEvent(JDA api, long responseNumber, Member member, VoiceChannel channelLeft)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VoiceChannelgetChannelJoined()TheVoiceChannelthat was joinedVoiceChannelgetChannelLeft()TheVoiceChannelthat theMemberis moved fromMembergetEntity()The affected entityVoiceChannelgetNewValue()The new valueVoiceChannelgetOldValue()The old valueStringgetPropertyIdentifier()The field name for the updated propertyStringtoString()-
Methods inherited from class net.dv8tion.jda.api.events.guild.voice.GenericGuildVoiceEvent
getMember, getVoiceState
-
Methods inherited from class net.dv8tion.jda.api.events.guild.GenericGuildEvent
getGuild
-
Methods inherited from class net.dv8tion.jda.api.events.Event
getJDA, getResponseNumber
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.dv8tion.jda.api.events.GenericEvent
getJDA, getResponseNumber
-
Methods inherited from interface net.dv8tion.jda.api.events.UpdateEvent
getEntityType
-
-
-
-
Method Detail
-
getChannelLeft
@Nonnull public VoiceChannel getChannelLeft()
Description copied from interface:GuildVoiceUpdateEventTheVoiceChannelthat theMemberis moved from- Specified by:
getChannelLeftin interfaceGuildVoiceUpdateEvent- Returns:
- The
VoiceChannel
-
getChannelJoined
@Nonnull public VoiceChannel getChannelJoined()
Description copied from interface:GuildVoiceUpdateEventTheVoiceChannelthat was joined- Specified by:
getChannelJoinedin interfaceGuildVoiceUpdateEvent- Returns:
- The
VoiceChannel
-
getOldValue
@Nonnull public VoiceChannel getOldValue()
Description copied from interface:UpdateEventThe old value- Specified by:
getOldValuein interfaceUpdateEvent<Member,VoiceChannel>- Returns:
- The old value
-
getNewValue
@Nonnull public VoiceChannel getNewValue()
Description copied from interface:UpdateEventThe new value- Specified by:
getNewValuein interfaceUpdateEvent<Member,VoiceChannel>- Returns:
- The new value
-
getPropertyIdentifier
@Nonnull public String getPropertyIdentifier()
Description copied from interface:UpdateEventThe field name for the updated propertyExample
@Override public void onGenericRoleUpdate(GenericRoleUpdateEvent event) { switch (event.getPropertyIdentifier()) { case RoleUpdateColorEvent.IDENTIFIER: System.out.printf("Updated color for role: %s%n", event); break; case RoleUpdatePositionEvent.IDENTIFIER: RoleUpdatePositionEvent update = (RoleUpdatePositionEvent) event; System.out.printf("Updated position for role: %s raw(%s->%s)%n", event, update.getOldPositionRaw(), update.getNewPositionRaw()); break; default: return; } }- Specified by:
getPropertyIdentifierin interfaceUpdateEvent<Member,VoiceChannel>- Returns:
- The name of the updated property
-
getEntity
@Nonnull public Member getEntity()
Description copied from interface:UpdateEventThe affected entity- Specified by:
getEntityin interfaceUpdateEvent<Member,VoiceChannel>- Returns:
- The affected entity
-
-