Add BlockSoundGroup interface

This PR adds the getSoundGroup() method in Block which returns a BlockSoundGroup
This commit is contained in:
simpleauthority
2019-05-28 03:41:28 -07:00
parent d1b40a9a13
commit d2e1163917
2 changed files with 85 additions and 0 deletions

View File

@@ -616,4 +616,25 @@ public interface Block extends Metadatable, Translatable {
* @return <code>true</code> if the block data can be placed here
*/
boolean canPlace(@NotNull BlockData data);
// Paper start
/**
* Gets the {@link com.destroystokyo.paper.block.BlockSoundGroup} for this block.
* <p>
* This object contains the block, step, place, hit, and fall sounds.
*
* @return the sound group for this block
* @deprecated use {@link #getBlockSoundGroup()}
*/
@NotNull
@Deprecated(forRemoval = true, since = "1.18.2")
com.destroystokyo.paper.block.BlockSoundGroup getSoundGroup();
/**
* Gets the {@link org.bukkit.SoundGroup} for this block.
*
* @return the sound group for this block
*/
@NotNull org.bukkit.SoundGroup getBlockSoundGroup();
// Paper end
}