Package de.mrjulsen.dragnsounds.core
Klasse ServerSoundManager
java.lang.Object
de.mrjulsen.dragnsounds.core.ServerSoundManager
-
Feldübersicht
-
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic 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 long
createSound
(InputStream audioData, SoundFile.Builder targetSettings, AudioSettings settings, Consumer<Optional<SoundFile>> afterConversion, Consumer<de.mrjulsen.mcdragonlib.data.StatusResult> onError) static long
createSound
(String filePath, SoundFile.Builder targetSettings, AudioSettings settings, Consumer<Optional<SoundFile>> afterUpload, Consumer<de.mrjulsen.mcdragonlib.data.StatusResult> onError) 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 long
playSoundOnce
(InputStream audioData, AudioSettings settings, PlaybackConfig playback, net.minecraft.server.level.ServerPlayer[] players, Runnable afterConversion, Consumer<de.mrjulsen.mcdragonlib.data.StatusResult> onError) static long
playSoundOnce
(String filePath, AudioSettings settings, PlaybackConfig playback, net.minecraft.server.level.ServerPlayer[] players, Runnable afterConversion, Consumer<de.mrjulsen.mcdragonlib.data.StatusResult> onError) static de.mrjulsen.mcdragonlib.data.StatusResult
prepareUploadPacket
(net.minecraft.server.level.ServerPlayer player, StartUploadSoundPacket packet) 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)
-
Felddetails
-
BUFFER_BLOCK_SIZE
public static final int BUFFER_BLOCK_SIZE- Siehe auch:
-
-
Konstruktordetails
-
ServerSoundManager
public ServerSoundManager()
-
-
Methodendetails
-
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) -
prepareUploadPacket
public static de.mrjulsen.mcdragonlib.data.StatusResult prepareUploadPacket(net.minecraft.server.level.ServerPlayer player, StartUploadSoundPacket packet) -
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 - Löst aus:
IOException
-
getSoundFile
- Löst aus:
IOException
-
deleteSound
public static de.mrjulsen.mcdragonlib.data.StatusResult deleteSound(SoundLocation loc, String id) throws IOException - Löst aus:
IOException
-
getAllSoundFileMetadata
-
getAllSoundFiles
-
getAllSoundFilesIn
-
getAllUsedLocations
-
getAllUsedLocationsIn
-
cleanUp
public static void cleanUp(net.minecraft.world.level.Level level, boolean async) -
createSound
public static long createSound(String filePath, SoundFile.Builder targetSettings, AudioSettings settings, Consumer<Optional<SoundFile>> afterUpload, Consumer<de.mrjulsen.mcdragonlib.data.StatusResult> onError) -
createSound
public static long createSound(InputStream audioData, SoundFile.Builder targetSettings, AudioSettings settings, Consumer<Optional<SoundFile>> afterConversion, Consumer<de.mrjulsen.mcdragonlib.data.StatusResult> onError) -
playSoundOnce
public static long playSoundOnce(String filePath, AudioSettings settings, PlaybackConfig playback, net.minecraft.server.level.ServerPlayer[] players, Runnable afterConversion, Consumer<de.mrjulsen.mcdragonlib.data.StatusResult> onError) -
playSoundOnce
public static long playSoundOnce(InputStream audioData, AudioSettings settings, PlaybackConfig playback, net.minecraft.server.level.ServerPlayer[] players, Runnable afterConversion, Consumer<de.mrjulsen.mcdragonlib.data.StatusResult> onError)
-