Class PlexModule

java.lang.Object
dev.plex.module.PlexModule

public abstract class PlexModule extends Object
  • Field Details Link icon

    • commands Link icon

      private final List<PlexCommand> commands
    • listeners Link icon

      private final List<PlexListener> listeners
    • plex Link icon

      private Plex plex
    • plexModuleFile Link icon

      private PlexModuleFile plexModuleFile
    • dataFolder Link icon

      private File dataFolder
    • logger Link icon

      private org.apache.logging.log4j.Logger logger
  • Constructor Details Link icon

    • PlexModule Link icon

      public PlexModule()
  • Method Details Link icon

    • load Link icon

      public void load()
    • enable Link icon

      public void enable()
    • disable Link icon

      public void disable()
    • registerListener Link icon

      public void registerListener (PlexListener listener)
      Registers a PlexListener within a module
      Parameters:
      listener - The PlexListener to be registered
    • unregisterListener Link icon

      public void unregisterListener (PlexListener listener)
      Unregisters a PlexListener. Handled by Plex automatically
      Parameters:
      listener - The PlexListener to be registered
    • registerCommand Link icon

      public void registerCommand (PlexCommand command)
      Registers a PlexCommand within a module
      Parameters:
      command - The PlexCommand to be registered
    • unregisterCommand Link icon

      public void unregisterCommand (PlexCommand command)
      Unregisters a PlexCommand. Handled by Plex automatically
      Parameters:
      command - The PlexCommand to be registered
    • getCommand Link icon

      public PlexCommand getCommand (String name)
    • addDefaultMessage Link icon

      public void addDefaultMessage (String message, Object initValue)
      Adds a message to the messages.yml file
      Parameters:
      message - The key value for the message
      initValue - The message itself
    • addDefaultMessage Link icon

      public void addDefaultMessage (String message, Object initValue, String... comments)
      Adds a message to the messages.yml with a comment
      Parameters:
      message - The key value for the message
      initValue - The message itself
      comments - The comments to be placed above the message
    • getResource Link icon

      @Nullable public @Nullable InputStream getResource (@NotNull @NotNull String filename)