UpdateEvent<VoiceChannel,java.lang.Integer>public class VoiceChannelUpdatePositionEvent extends GenericVoiceChannelUpdateEvent<java.lang.Integer>
VoiceChannel's position changed.
Can be used to get affected VoiceChannel, affected Guild and previous position.
Identifier: position
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
IDENTIFIER |
| Constructor | Description |
|---|---|
VoiceChannelUpdatePositionEvent(JDA api,
long responseNumber,
VoiceChannel channel,
int oldPosition) |
| Modifier and Type | Method | Description |
|---|---|---|
int |
getNewPosition() |
The new position
|
java.lang.Integer |
getNewValue() |
The new value
|
int |
getOldPosition() |
The old position
|
java.lang.Integer |
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 VoiceChannelUpdatePositionEvent(JDA api, long responseNumber, VoiceChannel channel, int oldPosition)
public int getOldPosition()
public int getNewPosition()
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 java.lang.Integer getOldValue()
UpdateEventpublic java.lang.Integer getNewValue()
UpdateEvent