Skip to content
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

GH-230 Implement Sponge platform support #372

Merged
merged 10 commits into from
Feb 8, 2024

Conversation

BlackBaroness
Copy link
Contributor

Closes #230

Hi, sorry for being super late!

Here is a Sponge 8 support (it's the latest stable API, included in all modern Sponge builds).

I added a ServerPlayer argument, ServerPlayer contextual and test /tp <player> [player] command. You can test it yourself using ./gradlew :examples:sponge:runServer. I also wanted to add a /gm command, but Sponge has... special... API design and I couldn't understand how to make proper suggestions (but the parsing was relatively fine). However, I believe it's enough for this platform.

image


It's the newly opened version of my previous PR. Changes in this one:

  1. Based on newest master branch
  2. Register ServerPlayerArgument and ServerPlayerOnlyContextual automatically, just like in Bukkit platform
  3. Use MessageKey system to handle argument/contextual messages instead of using legacy contructor variant
  4. Make ServerPlayerOnlyContextual return ServerPlayer, not Player

@Rollczi Rollczi changed the title Implement Sponge platform support GH-230 Implement Sponge platform support Feb 5, 2024
examples/sponge/build.gradle.kts Outdated Show resolved Hide resolved
@Rollczi
Copy link
Owner

Rollczi commented Feb 7, 2024

@BlackBaroness Thanks for your pull request. I tested all changes and fixed a few issues. There is also a new example of kick command 😸. Check out the new changes and give me your feedback if everything is okay with my changes (I don't have any experiences with the sponge platform.

@BlackBaroness
Copy link
Contributor Author

Check out the new changes and give me your feedback if everything is okay

Everything looks good (I don't use Sponge either btw)

Did you test it? I believe I had errors when LiteSpongeCommand and LiteSpongePlatform were not public, that's why I did it like that. Sponge tried to access these classes for some reason

@Rollczi
Copy link
Owner

Rollczi commented Feb 7, 2024

Check out the new changes and give me your feedback if everything is okay

Everything looks good (I don't use Sponge either btw)

Did you test it? I believe I had errors when LiteSpongeCommand and LiteSpongePlatform were not public, that's why I did it like that. Sponge tried to access these classes for some reason

Yeah, you are right. Sponge does not support package-private classes :/. I will fix that.

@Rollczi Rollczi merged commit 157f605 into Rollczi:master Feb 8, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Sponge platform (server and client)
3 participants