-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move sound methods and refactor sound structure (#292)
- Loading branch information
1 parent
4b8df70
commit 5dab05e
Showing
7 changed files
with
57 additions
and
57 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
src/main/java/minevalley/core/api/audio/SoundReceiver.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package minevalley.core.api.audio; | ||
|
||
import net.kyori.adventure.sound.Sound; | ||
import org.bukkit.Location; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
@SuppressWarnings("unused") | ||
public interface SoundReceiver { | ||
|
||
/** | ||
* Plays a specific sound. | ||
* | ||
* @param sound sound to be played | ||
* @throws IllegalArgumentException if sound is null or an empty string | ||
*/ | ||
void playSound(@Nonnull Sound.Type sound) throws IllegalArgumentException; | ||
|
||
/** | ||
* Plays a specific sound. | ||
* | ||
* @param sound sound to be played | ||
* @param location location where the sound will be played | ||
* @param spatial defines whether the sound should be spatial | ||
* @throws IllegalArgumentException if sound or location is null, or the location is not in the same world as the user | ||
*/ | ||
void playSound(@Nonnull Sound.Type sound, @Nonnull Location location, boolean spatial) throws IllegalArgumentException; | ||
} |
This file contains 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
7 changes: 0 additions & 7 deletions
7
src/main/java/minevalley/core/api/enums/sounds/AmbientSound.java
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package minevalley.core.api.users; | ||
|
||
public enum Ambient { | ||
|
||
NONE, | ||
TRAIN_STATION | ||
} |
This file contains 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