Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
javaVersion=25
mcVersion=26.1.1
group=dev.slne.surf.api
version=3.0.4
version=3.0.5
Comment on lines 9 to +10
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a patch-version bump, but the companion-object refactor in SurfPaperPacketApi can be a breaking change for Java callers/binary compatibility (loss of getINSTANCE() static accessor without @JvmStatic). Either preserve the previous Java API shape or consider a version bump consistent with a breaking change.

Copilot uses AI. Check for mistakes.
relocationPrefix=dev.slne.surf.api.libs
snapshot=false
9 changes: 7 additions & 2 deletions surf-api-paper/surf-api-paper/api/surf-api-paper.api
Original file line number Diff line number Diff line change
Expand Up @@ -2024,7 +2024,6 @@ public abstract interface class dev/slne/surf/api/paper/nms/listener/packets/ser

public abstract interface class dev/slne/surf/api/paper/packet/SurfPaperPacketApi {
public static final field Companion Ldev/slne/surf/api/paper/packet/SurfPaperPacketApi$Companion;
public static fun getINSTANCE ()Ldev/slne/surf/api/paper/packet/SurfPaperPacketApi;
public abstract fun registerPacketLoreListener (Lorg/bukkit/plugin/Plugin;Lorg/bukkit/NamespacedKey;Ldev/slne/surf/api/paper/packet/lore/SurfPaperPacketLoreHandler;)V
public fun registerPacketLoreListener (Lorg/bukkit/plugin/Plugin;Lorg/bukkit/NamespacedKey;Ldev/slne/surf/api/paper/packet/lore/SurfPaperPacketLoreHandlerSimple;)V
public abstract fun registerPacketLoreListenerGlobal (Lorg/bukkit/plugin/Plugin;Ldev/slne/surf/api/paper/packet/lore/SurfPaperPacketLoreHandler;)V
Expand All @@ -2033,8 +2032,14 @@ public abstract interface class dev/slne/surf/api/paper/packet/SurfPaperPacketAp
public abstract fun unregisterPacketLoreListener (Lorg/bukkit/plugin/Plugin;)V
}

public final class dev/slne/surf/api/paper/packet/SurfPaperPacketApi$Companion {
public final class dev/slne/surf/api/paper/packet/SurfPaperPacketApi$Companion : dev/slne/surf/api/paper/packet/SurfPaperPacketApi {
public final fun getINSTANCE ()Ldev/slne/surf/api/paper/packet/SurfPaperPacketApi;
public fun registerPacketLoreListener (Lorg/bukkit/plugin/Plugin;Lorg/bukkit/NamespacedKey;Ldev/slne/surf/api/paper/packet/lore/SurfPaperPacketLoreHandler;)V
public fun registerPacketLoreListener (Lorg/bukkit/plugin/Plugin;Lorg/bukkit/NamespacedKey;Ldev/slne/surf/api/paper/packet/lore/SurfPaperPacketLoreHandlerSimple;)V
public fun registerPacketLoreListenerGlobal (Lorg/bukkit/plugin/Plugin;Ldev/slne/surf/api/paper/packet/lore/SurfPaperPacketLoreHandler;)V
public fun registerPacketLoreListenerGlobal (Lorg/bukkit/plugin/Plugin;Ldev/slne/surf/api/paper/packet/lore/SurfPaperPacketLoreHandlerSimple;)V
public fun unregisterPacketLoreListener (Lorg/bukkit/NamespacedKey;)V
public fun unregisterPacketLoreListener (Lorg/bukkit/plugin/Plugin;)V
}

public final class dev/slne/surf/api/paper/packet/SurfPaperPacketApi$DefaultImpls {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ interface SurfPaperPacketApi {
*/
fun unregisterPacketLoreListener(plugin: Plugin)

companion object {
@JvmStatic
companion object : SurfPaperPacketApi by api {
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing @JvmStatic from the INSTANCE property changes the Java-facing API: callers that previously used SurfPaperPacketApi.getINSTANCE() (and binaries compiled against it) will break and now must use SurfPaperPacketApi.Companion.getINSTANCE(). If Java/source+binary compatibility is intended, keep @JvmStatic on INSTANCE (even with the delegated companion), or explicitly treat this as a breaking API change and version accordingly (and update ABI dump).

Suggested change
companion object : SurfPaperPacketApi by api {
companion object : SurfPaperPacketApi by api {
@JvmStatic

Copilot uses AI. Check for mistakes.
val INSTANCE get() = api
}
}
Expand Down