Class ListenerAdapter

java.lang.Object
net.dv8tion.jda.api.hooks.ListenerAdapter
All Implemented Interfaces:
EventListener

public abstract class ListenerAdapter extends Object implements EventListener
An abstract implementation of EventListener which divides Events for you. You should override the methods provided by this class for your event listener implementation.

Example:


 public class MyReadyListener extends ListenerAdapter
 {
    @Override
     public void onReady(ReadyEvent event)
     {
         System.out.println("I am ready to go!");
     }

    @Override
     public void onMessageReceived(MessageReceivedEvent event)
     {
         System.out.printf("[%s]: %s\n", event.getAuthor().getName(), event.getMessage().getContentDisplay());
     }
 }
 
See Also: