Add self-emitter option to playSound function#96
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces an overloaded playSound function with a self-emitter option to allow sounds to be played with a self-targeted emitter, providing additional flexibility when invoking the API.
- Added a new overload for playSound accepting a Boolean for self-emitter selection.
- Updated API interface definitions in multiple modules accordingly.
- Bumped the version in gradle.properties.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| surf-api-velocity/surf-api-velocity-api/api/surf-api-velocity-api.api | Added playSound overload with a Boolean parameter to support the self-emitter option. |
| surf-api-core/surf-api-core-api/src/main/kotlin/dev/slne/surf/surfapi/core/api/messages/adventure/audience-extension.kt | Added an inline extension function for playSound enabling self-emitter behavior. |
| surf-api-core/surf-api-core-api/api/surf-api-core-api.api | Corresponding API signature update for the new playSound overload. |
| surf-api-bukkit/surf-api-bukkit-api/api/surf-api-bukkit-api.api | Updated API definition to include the new playSound overload. |
| gradle.properties | Updated SNAPSHOT version information. |
Comments suppressed due to low confidence (1)
surf-api-core/surf-api-core-api/src/main/kotlin/dev/slne/surf/surfapi/core/api/messages/adventure/audience-extension.kt:25
- [nitpick] Consider renaming the 'self' parameter to something more descriptive (e.g., 'useSelfEmitter') to improve clarity on its purpose.
inline fun Audience.playSound(self: Boolean, block: @SoundDsl Sound.Builder.() -> Unit) {
twisti-dev
approved these changes
May 19, 2025
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.
No description provided.