Klasse SoundFileInfo

java.lang.Object
de.mrjulsen.dragnsounds.core.filesystem.SoundFileInfo
Alle implementierten Schnittstellen:
de.mrjulsen.mcdragonlib.data.INBTSerializable

public class SoundFileInfo extends Object implements de.mrjulsen.mcdragonlib.data.INBTSerializable
A collection of read-only properties about the file.
  • Felddetails

  • Konstruktordetails

    • SoundFileInfo

      public SoundFileInfo(long duration, long fileSize, UUID ownerId, long uploadTimestamp, int channels, String title, String artist, String year, String album, String genre)
  • Methodendetails

    • getDuration

      public long getDuration()
      A shortcut to get the playback duration of the sound file. Use this method instead of other methods to calculate it, since it has higher performance. The value changes automatically when the file hash changes.
      Gibt zurück:
      The playback duration in seconds.
    • getSize

      public long getSize()
      A shortcut to get the size of the sound file. Use this method instead of other methods to calculate it, since it has higher performance. The value changes automatically when the file hash changes.
      Gibt zurück:
      The size of the file in bytes.
    • getOwnerId

      public UUID getOwnerId()
      Gibt zurück:
      The UUID of the player which has uploaded this file.
    • getUploadTimeMillis

      public long getUploadTimeMillis()
      Gibt zurück:
      The timestamp in millis when the player has uploaded this file.
    • getUploadDate

      public Date getUploadDate()
      Gibt zurück:
      A formatted representation of the time when the player has uploaded this file.
    • getUploadTimeFormatted

      public String getUploadTimeFormatted()
      Gibt zurück:
      A formatted representation of the time when the player has uploaded this file.
    • getOriginalTitle

      public String getOriginalTitle()
      Gibt zurück:
      The original title of the sound file which has been uploaded.
    • getArtist

      public String getArtist()
      Gibt zurück:
      The original artist of the sound file which has been uploaded.
    • getDate

      public String getDate()
      Gibt zurück:
      The original date of the sound file which has been uploaded.
    • getGenre

      public String getGenre()
      Gibt zurück:
      The original genre of the sound file which has been uploaded.
    • getAlbum

      public String getAlbum()
      Gibt zurück:
      The original album of the sound file which has been uploaded.
    • getChannels

      public int getChannels()
      Gibt zurück:
      The amount of audio channels in this file.
    • fromNbt

      public static SoundFileInfo fromNbt(net.minecraft.nbt.CompoundTag nbt)
    • serializeNbt

      public net.minecraft.nbt.CompoundTag serializeNbt()
      Angegeben von:
      serializeNbt in Schnittstelle de.mrjulsen.mcdragonlib.data.INBTSerializable
    • deserializeNbt

      public void deserializeNbt(net.minecraft.nbt.CompoundTag nbt)
      Angegeben von:
      deserializeNbt in Schnittstelle de.mrjulsen.mcdragonlib.data.INBTSerializable
    • empty

      public static SoundFileInfo empty()
    • of

      public static SoundFileInfo of(File file, UUID owner, long timestamp, int initialChannels, long initialDuration)