Package net.dv8tion.jda.api.events.self
Class SelfUpdateNameEvent
- java.lang.Object
-
- net.dv8tion.jda.api.events.Event
-
- net.dv8tion.jda.api.events.self.GenericSelfUpdateEvent<java.lang.String>
-
- net.dv8tion.jda.api.events.self.SelfUpdateNameEvent
-
- All Implemented Interfaces:
GenericEvent
,UpdateEvent<SelfUser,java.lang.String>
public class SelfUpdateNameEvent extends GenericSelfUpdateEvent<java.lang.String>
Indicates that the name of the current user changed.Can be used to retrieve the old name.
Identifier:
name
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
IDENTIFIER
-
Constructor Summary
Constructors Constructor Description SelfUpdateNameEvent(JDA api, long responseNumber, java.lang.String oldName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getNewName()
The new namejava.lang.String
getNewValue()
The new valuejava.lang.String
getOldName()
The old namejava.lang.String
getOldValue()
The old value-
Methods inherited from class net.dv8tion.jda.api.events.self.GenericSelfUpdateEvent
getEntity, getPropertyIdentifier, getSelfUser, toString
-
Methods inherited from class net.dv8tion.jda.api.events.Event
getJDA, getResponseNumber
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.dv8tion.jda.api.events.GenericEvent
getJDA, getResponseNumber
-
Methods inherited from interface net.dv8tion.jda.api.events.UpdateEvent
getEntityType
-
-
-
-
Field Detail
-
IDENTIFIER
public static final java.lang.String IDENTIFIER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SelfUpdateNameEvent
public SelfUpdateNameEvent(@Nonnull JDA api, long responseNumber, @Nonnull java.lang.String oldName)
-
-
Method Detail
-
getOldName
@Nonnull public java.lang.String getOldName()
The old name- Returns:
- The old name
-
getNewName
@Nonnull public java.lang.String getNewName()
The new name- Returns:
- The new name
-
getOldValue
@Nonnull public java.lang.String getOldValue()
Description copied from interface:UpdateEvent
The old value- Specified by:
getOldValue
in interfaceUpdateEvent<SelfUser,java.lang.String>
- Overrides:
getOldValue
in classGenericSelfUpdateEvent<java.lang.String>
- Returns:
- The old value
-
getNewValue
@Nonnull public java.lang.String getNewValue()
Description copied from interface:UpdateEvent
The new value- Specified by:
getNewValue
in interfaceUpdateEvent<SelfUser,java.lang.String>
- Overrides:
getNewValue
in classGenericSelfUpdateEvent<java.lang.String>
- Returns:
- The new value
-
-