Skip to content

Fix/fix folia issues and persistentce#39

Merged
Keviro merged 6 commits intoversion/1.21.11from
fix/fix-folia-issues-and-persistentce
Feb 24, 2026
Merged

Fix/fix folia issues and persistentce#39
Keviro merged 6 commits intoversion/1.21.11from
fix/fix-folia-issues-and-persistentce

Conversation

@TheBjoRedCraft
Copy link
Copy Markdown
Member

No description provided.

@TheBjoRedCraft TheBjoRedCraft self-assigned this Feb 24, 2026
Copilot AI review requested due to automatic review settings February 24, 2026 19:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses Folia compatibility issues and fixes NPC persistence bugs in the surf-npc plugin. The changes include adding proper persistence checks before saving NPCs, fixing a missing entityType field in the save method, improving listener architecture by converting them to Kotlin objects, and adding Folia support through the Canvas API.

Changes:

  • Fixed NPC persistence to prevent non-persistent NPCs from being saved to disk
  • Fixed missing entityType field in NPC save method
  • Added Folia support through Canvas API with conditional listener registration
  • Converted Bukkit event listeners from classes to objects (Kotlin best practice)
  • Improved example plugin robustness by using dynamic world name instead of hardcoded value

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
surf-npc-paper/src/main/kotlin/dev/slne/surf/npc/paper/service/StorageService.kt Added persistence check guard and fixed missing entityType field in save method
surf-npc-paper/src/main/kotlin/dev/slne/surf/npc/paper/listener/WorldChangeListener.kt Converted from class to object for singleton pattern
surf-npc-paper/src/main/kotlin/dev/slne/surf/npc/paper/listener/InternalNpcEventListener.kt Converted from class to object for singleton pattern
surf-npc-paper/src/main/kotlin/dev/slne/surf/npc/paper/listener/FoliaAdditionsListener.kt New listener for handling Folia-specific teleport events through Canvas API
surf-npc-paper/src/main/kotlin/dev/slne/surf/npc/paper/listener/ConnectionListener.kt Converted from class to object for singleton pattern
surf-npc-paper/src/main/kotlin/dev/slne/surf/npc/paper/PaperMain.kt Updated listener registration, added Canvas server detection, and conditional Folia listener registration
surf-npc-paper/build.gradle.kts Added Canvas API dependency and repository with proper capability resolution
surf-npc-example-dsl/src/main/kotlin/dev/slne/surf/npc/example/SurfNpcExamplePlugin.kt Changed hardcoded world name to dynamic retrieval for better robustness
gradle.properties Bumped version from 1.6.0 to 1.6.1

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Keviro Keviro disabled auto-merge February 24, 2026 20:48
@Keviro Keviro merged commit f22ef99 into version/1.21.11 Feb 24, 2026
4 checks passed
@TheBjoRedCraft TheBjoRedCraft deleted the fix/fix-folia-issues-and-persistentce branch March 13, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants