UpdateEvent<VoiceChannel,java.lang.Integer>
public class VoiceChannelUpdateUserLimitEvent extends GenericVoiceChannelUpdateEvent<java.lang.Integer>
VoiceChannel
's user limit changed.
Can be used to get affected VoiceChannel, affected Guild and previous user limit.
Identifier: userlimit
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
IDENTIFIER |
Constructor | Description |
---|---|
VoiceChannelUpdateUserLimitEvent(JDA api,
long responseNumber,
VoiceChannel channel,
int oldUserLimit) |
Modifier and Type | Method | Description |
---|---|---|
int |
getNewUserLimit() |
The new userlimit
|
java.lang.Integer |
getNewValue() |
The new value
|
int |
getOldUserLimit() |
The old userlimit
|
java.lang.Integer |
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 VoiceChannelUpdateUserLimitEvent(JDA api, long responseNumber, VoiceChannel channel, int oldUserLimit)
public int getOldUserLimit()
public int getNewUserLimit()
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()
UpdateEvent
public java.lang.Integer getNewValue()
UpdateEvent