Package de.mrjulsen.dragnsounds.core
Class ServerSoundManager
java.lang.Object
de.mrjulsen.dragnsounds.core.ServerSoundManager
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
cleanUp
(net.minecraft.world.level.Level level, boolean async) static void
closeOnDisconnect
(net.minecraft.world.entity.player.Player player) static void
closeUpload
(long requestId) static de.mrjulsen.mcdragonlib.data.StatusResult
deleteSound
(SoundLocation loc, String id) getAllSoundFileMetadata
(SoundLocation loc, String id) static Collection<SoundFile>
getAllSoundFiles
(net.minecraft.world.level.Level level) static Collection<SoundFile>
getAllSoundFilesIn
(SoundLocation location) static Collection<SoundLocation>
getAllUsedLocations
(net.minecraft.world.level.Level level) static Collection<SoundLocation>
getAllUsedLocationsIn
(SoundLocation location) static SoundFile
getSoundFile
(SoundLocation location, String id) static SoundFile[]
getSoundFileList
(net.minecraft.world.level.Level level, IFilter<SoundFile>[] filters) static void
getSoundPlaybackData
(long soundId, net.minecraft.server.level.ServerPlayer[] players, SoundGetDataCallback.ISoundPlaybackData callback) static long
playSound
(SoundFile file, PlaybackConfig playback, net.minecraft.server.level.ServerPlayer[] players, long clientCallbackRequestId) static void
receiveUploadPacket
(net.minecraft.server.level.ServerPlayer player, UploadSoundPacket packet) static void
sendFileListToPlayer
(net.minecraft.world.entity.player.Player player, long requestId, net.minecraft.world.level.Level level, IFilter<SoundFile>[] filters) static void
sendSoundData
(net.minecraft.world.entity.player.Player player, long soundId, int size, int index) static void
stopSound
(net.minecraft.world.entity.player.Player player, long soundId)
-
Field Details
-
BUFFER_BLOCK_SIZE
public static final int BUFFER_BLOCK_SIZE- See Also:
-
-
Constructor Details
-
ServerSoundManager
public ServerSoundManager()
-
-
Method Details
-
playSound
public static long playSound(SoundFile file, PlaybackConfig playback, net.minecraft.server.level.ServerPlayer[] players, long clientCallbackRequestId) -
sendSoundData
public static void sendSoundData(net.minecraft.world.entity.player.Player player, long soundId, int size, int index) -
closeOnDisconnect
public static void closeOnDisconnect(net.minecraft.world.entity.player.Player player) -
getSoundPlaybackData
public static void getSoundPlaybackData(long soundId, net.minecraft.server.level.ServerPlayer[] players, SoundGetDataCallback.ISoundPlaybackData callback) -
stopSound
public static void stopSound(net.minecraft.world.entity.player.Player player, long soundId) -
receiveUploadPacket
public static void receiveUploadPacket(net.minecraft.server.level.ServerPlayer player, UploadSoundPacket packet) -
closeUpload
public static void closeUpload(long requestId) -
sendFileListToPlayer
-
getSoundFileList
public static SoundFile[] getSoundFileList(net.minecraft.world.level.Level level, IFilter<SoundFile>[] filters) throws IOException - Throws:
IOException
-
getSoundFile
- Throws:
IOException
-
deleteSound
public static de.mrjulsen.mcdragonlib.data.StatusResult deleteSound(SoundLocation loc, String id) throws IOException - Throws:
IOException
-
getAllSoundFileMetadata
-
getAllSoundFiles
-
getAllSoundFilesIn
-
getAllUsedLocations
-
getAllUsedLocationsIn
-
cleanUp
public static void cleanUp(net.minecraft.world.level.Level level, boolean async)
-