Package space.subkek.customdiscs.api
Class DiscEntry
java.lang.Object
space.subkek.customdiscs.api.DiscEntry
Represents a custom music disc entry within the system.
This class acts as a data container that links a physical Minecraft ItemStack
with its corresponding audio source metadata and identifier.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull org.bukkit.inventory.ItemStackgetDisc()Returns the physical item associated with this music disc.@NotNull StringReturns the unique identifier of the audio source.@NotNull net.kyori.adventure.text.ComponentgetName()Returns the formatted display name of the disc track.booleanisLocal()Indicates whether the audio source is located on the local server storage.
-
Constructor Details
-
DiscEntry
public DiscEntry(org.bukkit.inventory.ItemStack disc, net.kyori.adventure.text.Component name, String identifier, boolean local) Constructs a new DiscEntry.- Parameters:
disc- TheItemStackrepresenting the disc in game.name- The display name of the track (e.g., used for action bars or tooltips).identifier- The source identifier (URL, file path, or unique ID) used to load the audio.local-trueif the source is stored on the local filesystem,falseif it is a remote resource.
-
-
Method Details
-
getDisc
@NotNull public @NotNull org.bukkit.inventory.ItemStack getDisc()Returns the physical item associated with this music disc.- Returns:
- The
ItemStackof the disc.
-
getName
@NotNull public @NotNull net.kyori.adventure.text.Component getName()Returns the formatted display name of the disc track. Usually displayed to the player when the disc starts playing.- Returns:
- The track name as an Adventure
Component.
-
getIdentifier
Returns the unique identifier of the audio source. This string is used by the audio engine to resolve and play the track.- Returns:
- The source string (e.g., a URL or a local file path).
-
isLocal
public boolean isLocal()Indicates whether the audio source is located on the local server storage.- Returns:
trueif the source is local;falseif it is a remote stream.
-