UpdateEvent<Guild,T>GuildUpdateAfkChannelEvent, GuildUpdateAfkTimeoutEvent, GuildUpdateExplicitContentLevelEvent, GuildUpdateFeaturesEvent, GuildUpdateIconEvent, GuildUpdateMFALevelEvent, GuildUpdateNameEvent, GuildUpdateNotificationLevelEvent, GuildUpdateOwnerEvent, GuildUpdateRegionEvent, GuildUpdateSplashEvent, GuildUpdateSystemChannelEvent, GuildUpdateVerificationLevelEventpublic abstract class GenericGuildUpdateEvent<T> extends GenericGuildEvent implements UpdateEvent<Guild,T>
Guild was updated.
Can be used to detect when a Guild is updated.
| Constructor | Description |
|---|---|
GenericGuildUpdateEvent(JDA api,
long responseNumber,
Guild guild,
T previous,
T next,
java.lang.String identifier) |
| Modifier and Type | Method | Description |
|---|---|---|
Guild |
getEntity() |
The affected entity
|
T |
getNewValue() |
The new value
|
T |
getOldValue() |
The old value
|
java.lang.String |
getPropertyIdentifier() |
The field name for the updated property
|
java.lang.String |
toString() |
getJDA, getResponseNumbergetGuildequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetEntityTypepublic Guild getEntity()
UpdateEventgetEntity in interface UpdateEvent<Guild,T>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;
}
}
getPropertyIdentifier in interface UpdateEvent<Guild,T>public T getOldValue()
UpdateEventgetOldValue in interface UpdateEvent<Guild,T>public T getNewValue()
UpdateEventgetNewValue in interface UpdateEvent<Guild,T>public java.lang.String toString()
toString in class java.lang.Object