Conversation
gibbie please add maps or nested data classes this is awful
Finally removed PlayerManager.kt Fixed Location.kt using incorrect return types Signed-off-by: zNotChill <znotchill@znci.dev>
Signed-off-by: zNotChill <znotchill@znci.dev>
feat: server global and implementation
Signed-off-by: zNotChill <znotchill@znci.dev>
…r server broadcast function
Signed-off-by: zNotChill <znotchill@znci.dev>
There was a problem hiding this comment.
Pull Request Overview
This PR rewrites the codebase to use the Twine API instead of the Rocket API while also cleaning up various sections and improving global and command registration.
- Replaces Rocket API errors, functions, and tables with their Twine equivalents.
- Updates command logic including handling aliases, HTTP client requests, and global initialization.
- Removes deprecated Rocket files and annotations.
Reviewed Changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/kotlin/dev/znci/rocket/scripting/globals/tables/Players.kt | Updated to use Twine API conventions and adjusted player property access. |
| src/main/kotlin/dev/znci/rocket/scripting/globals/tables/Location.kt | Tweaks to properties and conversion functions with Twine API annotation changes. |
| src/main/kotlin/dev/znci/rocket/scripting/globals/tables/HTTPClient.kt | Refactored GET/POST logic with additional timeout handling using TwineError. |
| src/main/kotlin/dev/znci/rocket/scripting/globals/tables/Commands.kt | Revised command registration and callback handling alongside Twine API changes. |
| Other files | Removal of Rocket-specific API files and adjustments in global initialization, script management, and error handling. |
Comments suppressed due to low confidence (1)
src/main/kotlin/dev/znci/rocket/scripting/globals/tables/Commands.kt:134
- Kotlin arrays are zero-indexed; using aliasList[i] when iterating from 1 to aliasList.size will throw an IndexOutOfBoundsException. Replace aliasList[i] with aliasList[i - 1].
for (i in 1..aliasList.size) { commandReference.aliases = commandReference.aliases.plus(aliasList[i]) }
Qodana Community for JVM50 new problems were found
☁️ View the detailed Qodana report Contact Qodana teamContact us at qodana-support@jetbrains.com
|
cerqiest
requested changes
Apr 20, 2025
Collaborator
cerqiest
left a comment
There was a problem hiding this comment.
Looks good mostly. See comments.
src/main/kotlin/dev/znci/rocket/scripting/globals/tables/HTTPClient.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/dev/znci/rocket/scripting/globals/tables/HTTPClient.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/dev/znci/rocket/scripting/globals/tables/Location.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/dev/znci/rocket/scripting/globals/tables/Location.kt
Outdated
Show resolved
Hide resolved
Collaborator
|
Can we also look in to resolving the qodana issues? |
Signed-off-by: zNotChill <znotchill@znci.dev>
Signed-off-by: zNotChill <znotchill@znci.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR rewrites the existing codebase to use the Twine API excluding the Events.kt file since that is not my responsibility anymore.
Not sure if this should be merged yet, but its very close