UpdateEvent<VoiceChannel,Category>
public class VoiceChannelUpdateParentEvent extends GenericVoiceChannelUpdateEvent<Category>
VoiceChannel
's parent changed.
Can be used to get the affected voice channel, guild and old parent.
Identifier: parent
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
IDENTIFIER |
Constructor | Description |
---|---|
VoiceChannelUpdateParentEvent(JDA api,
long responseNumber,
VoiceChannel channel,
Category oldParent) |
Modifier and Type | Method | Description |
---|---|---|
Category |
getNewParent() |
The new parent
Category |
Category |
getNewValue() |
The new value
|
Category |
getOldParent() |
The old parent
Category |
Category |
getOldValue() |
The old value
|
java.lang.String |
getPropertyIdentifier() |
The field name for the updated property
|
getJDA, getResponseNumber
getChannel, getGuild
getEntity, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getEntityType
public static final java.lang.String IDENTIFIER
public VoiceChannelUpdateParentEvent(JDA api, long responseNumber, VoiceChannel channel, Category oldParent)
public Category getOldParent()
Category
public Category getNewParent()
Category
public java.lang.String getPropertyIdentifier()
UpdateEvent
@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;
}
}
public Category getOldValue()
UpdateEvent
public Category getNewValue()
UpdateEvent