Class MessageConfiguration.Builder

java.lang.Object
me.efekos.simpler.config.MessageConfiguration.Builder
Enclosing class:
MessageConfiguration

public static class MessageConfiguration.Builder extends Object
Builder class that will hopefully help you create a message configuration.
  • Constructor Details

    • Builder

      public Builder()
      Creates a new builder.
  • Method Details

    • noPermission

      public MessageConfiguration.Builder noPermission(String noPerm)
      Changes the no-permission message. Which is a message that appears when the player tried to execute a BaseCommand or a SubCommand, but he doesn't have the permission for it.
      Parameters:
      noPerm - Your No-Permission message to replace with default one.
      Returns:
      Itself after changing the no-permission message.
    • usage

      public MessageConfiguration.Builder usage(String usage)
      Changes the usage message, which is a message that appears when the player used a command wrong according to its Syntax.
      Parameters:
      usage - Your Usage message to replace with default one.
      Returns:
      Itself after changing the usage message.
    • onlyPlayer

      public MessageConfiguration.Builder onlyPlayer(String onlyPlayer)
      Changes the only-player message, which is a message that appears when the console tried to use a command that is player-only.
      Parameters:
      onlyPlayer - Your Only-Player message to replace with default one.
      Returns:
      Itself after changing the only-player message.
    • paginatedMenuNext

      public MessageConfiguration.Builder paginatedMenuNext(String paginatedMenuNext)
      Changes the 'Next' shown at the buttons of PaginatedMenus.
      Parameters:
      paginatedMenuNext - Your paginated menu's 'Next' button message to replace with the default one.
      Returns:
      Itself after changing the paginated menu text.
    • paginatedMenuPrev

      public MessageConfiguration.Builder paginatedMenuPrev(String paginatedMenuPrev)
      Changes the 'Prev' shown at the buttons of PaginatedMenus.
      Parameters:
      paginatedMenuPrev - Your paginated menu's 'Prev' button message to replace with the default one.
      Returns:
      Itself after changing the paginated menu text.
    • paginatedMenuPage

      public MessageConfiguration.Builder paginatedMenuPage(String paginatedMenuPage)
      Changes the 'Page 1/?' shown at the buttons of PaginatedMenus.
      Parameters:
      paginatedMenuPage - Your paginated menu's page message to replace with the default one. %page% is the current page, %max% is the amount of pages.
      Returns:
      Itself after changing the paginated menu text.
    • required

      public MessageConfiguration.Builder required(String required)
      Changes the required message, which is a message that appears when the player didn't provide a ArgumentPriority.REQUIRED argument.
      Parameters:
      required - new required message.
      Returns:
      Itself after changing the required message.
    • listArgumentNotValid

      public MessageConfiguration.Builder listArgumentNotValid(String listArgumentNotValid)
      Appears when a ListArgument got an invalid value.
      Parameters:
      listArgumentNotValid - New message.
      Returns:
      itself for continuing to build.
    • numberArgumentIntMin

      public MessageConfiguration.Builder numberArgumentIntMin(String numberArgumentIntMin)
      Appears when a IntegerArgument got a value smaller than Integer.MIN_VALUE.
      Parameters:
      numberArgumentIntMin - New message
      Returns:
      itself for continuing to build.
    • numberArgumentIntMax

      public MessageConfiguration.Builder numberArgumentIntMax(String numberArgumentIntMax)
      Appears when a IntegerArgument got a value bigger than Integer.MAX_VALUE.
      Parameters:
      numberArgumentIntMax - New message.
      Returns:
      itself for continuing to build.
    • numberArgumentMin

      public MessageConfiguration.Builder numberArgumentMin(String numberArgumentMin)
      Appears when a IntegerArgument got a value smaller than its min.
      Parameters:
      numberArgumentMin - New message.
      Returns:
      itself for continuing to build.
    • numberArgumentMax

      public MessageConfiguration.Builder numberArgumentMax(String numberArgumentMax)
      Appears when a IntegerArgument got a value bigger than its max.
      Parameters:
      numberArgumentMax - New message.
      Returns:
      itself for continuing to build.
    • numberArgumentNaN

      public MessageConfiguration.Builder numberArgumentNaN(String numberArgumentNaN)
      Appears when a IntegerArgument got a value that isn't an Integer.
      Parameters:
      numberArgumentNaN - New message.
      Returns:
      itself for continuing to build.
    • playerArgumentNotPlayer

      public MessageConfiguration.Builder playerArgumentNotPlayer(String playerArgumentNotPlayer)
      Appears when a PlayerArgument got an invalid player name.
      Parameters:
      playerArgumentNotPlayer - New message.
      Returns:
      itself for continuing to build.
    • stringArgumentShort

      public MessageConfiguration.Builder stringArgumentShort(String stringArgumentShort)
      Appears when a StringArgument got a value shorter than it's min length.
      Parameters:
      stringArgumentShort - New message.
      Returns:
      itself for continuing to build.
    • stringArgumentLong

      public MessageConfiguration.Builder stringArgumentLong(String stringArgumentLong)
      Appears when a StringArgument got a value longer than it's max length.
      Parameters:
      stringArgumentLong - New message.
      Returns:
      itself for continuing to build.
    • build

      public MessageConfiguration build()
      Builds a MessageConfiguration using this builder.
      Returns:
      MessageConfiguration built.