Class VoiceChannelUpdateParentEvent
- java.lang.Object
-
- net.dv8tion.jda.core.events.Event
-
- net.dv8tion.jda.core.events.channel.voice.GenericVoiceChannelEvent
-
- net.dv8tion.jda.core.events.channel.voice.update.GenericVoiceChannelUpdateEvent<Category>
-
- net.dv8tion.jda.core.events.channel.voice.update.VoiceChannelUpdateParentEvent
-
- All Implemented Interfaces:
UpdateEvent<VoiceChannel,Category>
public class VoiceChannelUpdateParentEvent extends GenericVoiceChannelUpdateEvent<Category>
Indicates that aVoiceChannel
's parent changed.Can be used to get the affected voice channel, guild and old parent.
Identifier:
parent
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
IDENTIFIER
-
Constructor Summary
Constructors Constructor Description VoiceChannelUpdateParentEvent(JDA api, long responseNumber, VoiceChannel channel, Category oldParent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Category
getNewParent()
The new parentCategory
Category
getNewValue()
The new valueCategory
getOldParent()
The old parentCategory
Category
getOldValue()
The old valuejava.lang.String
getPropertyIdentifier()
The field name for the updated property-
Methods inherited from class net.dv8tion.jda.core.events.channel.voice.update.GenericVoiceChannelUpdateEvent
getEntity, toString
-
Methods inherited from class net.dv8tion.jda.core.events.channel.voice.GenericVoiceChannelEvent
getChannel, getGuild
-
Methods inherited from class net.dv8tion.jda.core.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.core.events.UpdateEvent
getEntityType
-
-
-
-
Field Detail
-
IDENTIFIER
public static final java.lang.String IDENTIFIER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
VoiceChannelUpdateParentEvent
public VoiceChannelUpdateParentEvent(JDA api, long responseNumber, VoiceChannel channel, Category oldParent)
-
-
Method Detail
-
getOldParent
public Category getOldParent()
The old parentCategory
- Returns:
- The old parent, or null
-
getNewParent
public Category getNewParent()
The new parentCategory
- Returns:
- The new parent, or null
-
getPropertyIdentifier
public java.lang.String getPropertyIdentifier()
Description copied from interface:UpdateEvent
The 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; } }
- Returns:
- The name of the updated property
-
getOldValue
public Category getOldValue()
Description copied from interface:UpdateEvent
The old value- Returns:
- The old value
-
getNewValue
public Category getNewValue()
Description copied from interface:UpdateEvent
The new value- Returns:
- The new value
-
-