Skip to content

Commit 14d614c

Browse files
committed
chore(api): Restore ClickEvent.Action#name
1 parent b792d2e commit 14d614c

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

api/src/main/java/net/kyori/adventure/text/event/ClickEvent.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,14 @@ sealed interface Action<T extends Payload> {
324324
*/
325325
boolean supports(final Payload payload);
326326

327+
/**
328+
* Returns the name of this action.
329+
*
330+
* @return the name of the action
331+
* @since 4.0.0
332+
*/
333+
String name();
334+
327335
/**
328336
* An action with a text payload.
329337
*

api/src/main/java/net/kyori/adventure/text/event/ClickEventImpl.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ public boolean supports(final Payload payload) {
6666
return this.payloadType.isInstance(payload);
6767
}
6868

69+
public String name() {
70+
return this.name;
71+
}
72+
6973
@Override
7074
public String toString() {
7175
return this.name;

0 commit comments

Comments
 (0)