Class PlaylistPlayer

java.lang.Object
com.sedmelluq.discord.lavaplayer.player.event.AudioEventAdapter
com.reign.kat.lib.voice.newvoice.PlaylistPlayer
All Implemented Interfaces:
com.sedmelluq.discord.lavaplayer.player.event.AudioEventListener

public class PlaylistPlayer extends com.sedmelluq.discord.lavaplayer.player.event.AudioEventAdapter
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    final com.sedmelluq.discord.lavaplayer.player.AudioPlayer
    LavaPlayer AudioPlayer instance.
    Current playing track - null if nothing is playing.
  • Constructor Summary

    Constructors
    Constructor
    Description
    PlaylistPlayer(com.sedmelluq.discord.lavaplayer.player.AudioPlayerManager manager, int volume)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    void
    Pause the player.
    boolean
    Immediately load and play the track.
    void
    Resume the player.
    long
    seek(long position)
    Seek to position in the current playing track.
    void
    Stops the current playing track, and do not play any next song in the queue.

    Methods inherited from class com.sedmelluq.discord.lavaplayer.player.event.AudioEventAdapter

    onEvent, onPlayerPause, onPlayerResume, onTrackEnd, onTrackException, onTrackStart, onTrackStuck, onTrackStuck

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ERROR_LIMIT

      public static final int ERROR_LIMIT
      See Also:
    • lavaPlayer

      public final com.sedmelluq.discord.lavaplayer.player.AudioPlayer lavaPlayer
      LavaPlayer AudioPlayer instance. This class DOES NOT manage JDAs audio player.
    • nowPlaying

      public RequestedTrack nowPlaying
      Current playing track - null if nothing is playing.
  • Constructor Details

    • PlaylistPlayer

      public PlaylistPlayer(com.sedmelluq.discord.lavaplayer.player.AudioPlayerManager manager, int volume)
  • Method Details

    • play

      public boolean play(RequestedTrack track)
      Immediately load and play the track.
      Parameters:
      track - RequestedTrack to start playing.
      Returns:
      boolean true if the play was successful.
    • pause

      public void pause()
      Pause the player.
    • resume

      public void resume()
      Resume the player.
    • stop

      public void stop()
      Stops the current playing track, and do not play any next song in the queue.
    • seek

      public long seek(long position)
      Seek to position in the current playing track.
      Parameters:
      position - long milliseconds to seek to.
      Returns:
      long milliseconds position of the track.
    • getSendHandler

      public AudioPlayerSendHandler getSendHandler()