-
Notifications
You must be signed in to change notification settings - Fork 3
Target Paper, update dependencies #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThis update introduces a comprehensive modernization and refactoring of the Mimic Bukkit plugin and its build ecosystem. The Java version is raised to 17 across all build scripts, workflows, and documentation. Dependency management is overhauled with expanded and updated versions in Changes
Sequence Diagram(s)sequenceDiagram
participant Server
participant MimicPlugin
participant MimicCommands
participant CommandAPI
participant FallbackCommand
Server->>MimicPlugin: onEnable()
MimicPlugin->>MimicCommands: register(plugin, mimic, config)
MimicCommands->>Server: Check if CommandAPI plugin is present and enabled
alt CommandAPI present and enabled
MimicCommands->>CommandAPI: Register Mimic command
else CommandAPI missing or disabled
MimicCommands->>Server: Register fallback command
Server->>FallbackCommand: Execute fallback command
FallbackCommand->>User: Send message with clickable CommandAPI link
end
Poem
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
mimic-bukkit/src/main/kotlin/internal/Configuration.kt (1)
15-17: Consider making parameters non-nullable for consistencyWhile the simplification to directly call the built-in method is good, there's an inconsistency between
setHeader(which uses non-nullableStringparameters) andsetComments(which still uses nullableString?parameters). Consider making the comments parameter non-nullable for consistency unless there's a specific reason to allow null values.-internal fun Configuration.setComments(path: String, vararg comments: String?) { +internal fun Configuration.setComments(path: String, vararg comments: String) { setComments(path, comments.asList()) }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
mimic-bukkit/src/main/kotlin/impl/vanilla/MinecraftItemsRegistry.kt(2 hunks)mimic-bukkit/src/main/kotlin/internal/Compat.kt(2 hunks)mimic-bukkit/src/main/kotlin/internal/Configuration.kt(2 hunks)mimic-bukkit/src/main/kotlin/internal/NamespacedKey.kt(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- mimic-bukkit/src/main/kotlin/internal/NamespacedKey.kt
🚧 Files skipped from review as they are similar to previous changes (2)
- mimic-bukkit/src/main/kotlin/impl/vanilla/MinecraftItemsRegistry.kt
- mimic-bukkit/src/main/kotlin/internal/Compat.kt
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: Check
🔇 Additional comments (1)
mimic-bukkit/src/main/kotlin/internal/Configuration.kt (1)
6-8: Great improvement in type safety!Changing the parameter type from nullable to non-nullable
Stringimproves type safety and aligns with modern Kotlin best practices. The simplification by directly calling the built-in method also makes the code cleaner and more maintainable.
Keeping the plugin compatible both with Paper and Spigot consumes a lot of time.
Now, Mimic is Paper-first as it is the most popular platform.
This means that compatibility with Spigot is not guaranteed.
To reduce the maintenance burden, support for versions older than 1.20 has been dropped.
Java 17 is required.