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

feat: Add primitive support for sound api #1422

Open
wants to merge 1 commit into
base: dev/3.0.0
Choose a base branch
from

Conversation

Timongcraft
Copy link
Contributor

@Timongcraft Timongcraft commented Sep 3, 2024

With this PR, the Adventure-provided sound API is partially implemented.

This PR changes the previous behavior of failing all Adventure sound-related methods silently. The newly implemented methods now throw exception patterns similar to other methods.
I don't think compatibility needs to be kept here, as the methods were previously not implemented. However, this can be reverted if needed.

What this PR implements:

  • A method to play back (custom) sounds for a specific player (at the player itself) for players with 1.19.3+
  • A method to stop (custom) sounds for players with 1.19.3+

What this PR doesn't implement:

  • A method to play back (custom) sounds for a specific player at a position or another entity for players of all versions
  • A method to play back (custom) sounds (globally) at a specific location for players of all versions
  • A easily way to access a list of vanilla sounds
    - A method to play back (custom) sounds for a specific player (at the player itself) for players with 1.19.2 and below
    - A method to stop (custom) sounds for players with 1.19.2 and below

Clarification:
This PR only implements a sound API for version 1.19.3+ because only in this version is the server able to play a (vanilla) sound for a player without requiring a version-dependent id for the sound.

@Timongcraft

This comment was marked as resolved.

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.

1 participant