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