Fix NoSuchMethodError: 'Class ClickEvent$Action.payloadType()' error for Adventure 4.21 or older

This commit is contained in:
Nick committed 2025-12-18 18:10:05 -03:00
1 parent d7f3ff6e06
commit 6e2005c6c9
1 file changed
+1 -1
@@ -443,7 +443,7 @@ final class StyleSerializer extends TypeAdapter<Style> {
out.endObject(); out.endObject();
} }
if (this.emitCamelCaseClick && (BackwardCompatUtil.IS_4_22_0_OR_NEWER || action.payloadType() == ClickEvent.Payload.Text.class)) { // packetevents patch if (this.emitCamelCaseClick && (!BackwardCompatUtil.IS_4_22_0_OR_NEWER || action.payloadType() == ClickEvent.Payload.Text.class)) { // packetevents patch
out.name(CLICK_EVENT_CAMEL); out.name(CLICK_EVENT_CAMEL);
out.beginObject(); out.beginObject();
out.name(CLICK_EVENT_ACTION); out.name(CLICK_EVENT_ACTION);