Package dev.cwhead.GravesX.integration
Class NoteBlockAPI
java.lang.Object
dev.cwhead.GravesX.integration.NoteBlockAPI
Utility class to handle playing and stopping NoteBlockAPI songs for individual players or all players on the server.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if a song is currently playing for all players.booleanisSongPlayingForPlayer(UUID uuid) Checks if a song is currently playing for a specific player.booleanisSongPlayingForPlayer(org.bukkit.entity.Player player) Checks if a song is currently playing for a specific player.voidplaySongForAllPlayers(String fileName) Plays an NBS song file for all online players on the server.voidplaySongForPlayer(org.bukkit.entity.Player player, String fileName) Plays an NBS song file for a specified player.voidStops all active song players.voidStops the currently playing song for all players.voidstopSongForPlayer(UUID uuid) Stops the currently playing song for a specific player.voidstopSongForPlayer(org.bukkit.entity.Player player) Stops the currently playing song for a specific player.
-
Constructor Details
-
NoteBlockAPI
Constructs a new NoteBlockAPI instance.- Parameters:
plugin- the Graves plugin instance.
-
-
Method Details
-
playSongForPlayer
Plays an NBS song file for a specified player.- Parameters:
player- the player to play the song for.fileName- the name of the NBS file located in the /nbs directory.
-
playSongForAllPlayers
Plays an NBS song file for all online players on the server.- Parameters:
fileName- the name of the NBS file located in the /nbs directory.
-
stopSongForPlayer
public void stopSongForPlayer(org.bukkit.entity.Player player) Stops the currently playing song for a specific player.- Parameters:
player- the player for whom to stop the song.
-
stopSongForPlayer
Stops the currently playing song for a specific player.- Parameters:
uuid- the player uuid for whom to stop the song.
-
stopSongForAllPlayers
public void stopSongForAllPlayers()Stops the currently playing song for all players. -
stopAllSongs
public void stopAllSongs()Stops all active song players. -
isSongPlayingForPlayer
public boolean isSongPlayingForPlayer(org.bukkit.entity.Player player) Checks if a song is currently playing for a specific player.- Parameters:
player- the player to check for active song playback.- Returns:
- true if a song is actively playing for the player, false otherwise.
-
isSongPlayingForPlayer
Checks if a song is currently playing for a specific player.- Parameters:
uuid- the player's UUID to check for active song playback.- Returns:
- true if a song is actively playing for the player, false otherwise.
-
isSongPlayingForAllPlayers
public boolean isSongPlayingForAllPlayers()Checks if a song is currently playing for all players.- Returns:
- true if a song is actively playing for all players, false otherwise.
-