-
Notifications
You must be signed in to change notification settings - Fork 546
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
[CI Skip] Allow server owners to fully customize sounds #2844
Conversation
Your Pull Request was automatically labelled as: "🎈 Feature" |
…to feature/sound-manager
…to feature/sound-manager
feature/sound-manager Conflicts: src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/MinerAndroid.java src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/IronGolemAssembler.java
feature/sound-manager Conflicts: CHANGELOG.md
feature/sound-manager Conflicts: src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/AbstractSmeltery.java
Can someone pull latest changes? |
With the addition of #3694 this is now 2/3 done. Merging in both (and the followup with tests) into master independently to avoid one massive PR. |
src/main/java/io/github/thebusybiscuit/slimefun4/core/services/sounds/SoundConfiguration.java
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/core/services/sounds/SoundEffect.java
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/core/services/sounds/SoundEffect.java
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/core/services/sounds/SoundEffect.java
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/core/services/sounds/SoundEffect.java
Show resolved
Hide resolved
.../github/thebusybiscuit/slimefun4/implementation/items/multiblocks/EnhancedCraftingTable.java
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/Juicer.java
Show resolved
Hide resolved
...main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/PortableDustbin.java
Show resolved
Hide resolved
.../java/io/github/thebusybiscuit/slimefun4/implementation/listeners/SlimefunBootsListener.java
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/implementation/tasks/JetpackTask.java
Show resolved
Hide resolved
i was gonna spam all comments but nvm |
please pull the latest changes in this branch and then it should be ready to merge |
Slimefun preview buildA Slimefun preview build is available for testing! https://preview-builds.walshy.dev/download/Slimefun/2844/5411919802
|
Kudos, SonarCloud Quality Gate passed! |
Description
This pull request adds the
SoundService
and theSoundEffect
enum which allow us to easily play soundsbut also allow server owners to easily configure and customize sounds.
Note here that I opted for the minecraft-ids of sounds rather than the bukkit constants because this will allow
server owners to use completely custom sounds in combination with resource packs.
If a sound does not exist, the player will simply not hear anything, no error will be thrown.
When values are misconfigured, a helpful warning will appear in the console.
This will also protect us against Mojang sound changes in the future, as we don't have to worry about the support of changed enum constants or such.
Here is an example of the new config file:
ToDo (Why this is still a draft)
Checklist
Nonnull
andNullable
annotations to my methods to indicate their behaviour for null values