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, getResponseNumbergetChannel, getGuildgetEntity, toStringequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetEntityTypepublic static final java.lang.String IDENTIFIER
public VoiceChannelUpdateParentEvent(JDA api, long responseNumber, VoiceChannel channel, Category oldParent)
public Category getOldParent()
Categorypublic Category getNewParent()
Categorypublic 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()
UpdateEventpublic Category getNewValue()
UpdateEvent