Package me.efekos.simpler.config
Class MessageConfiguration.Builder
java.lang.Object
me.efekos.simpler.config.MessageConfiguration.Builder
- Enclosing class:
MessageConfiguration
Builder class that will hopefully help you create a message configuration.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aMessageConfigurationusing this builder.listArgumentNotValid(String listArgumentNotValid) Appears when aListArgumentgot an invalid value.noPermission(String noPerm) Changes the no-permission message.numberArgumentIntMax(String numberArgumentIntMax) Appears when aIntegerArgumentgot a value bigger thanInteger.MAX_VALUE.numberArgumentIntMin(String numberArgumentIntMin) Appears when aIntegerArgumentgot a value smaller thanInteger.MIN_VALUE.numberArgumentMax(String numberArgumentMax) Appears when aIntegerArgumentgot a value bigger than its max.numberArgumentMin(String numberArgumentMin) Appears when aIntegerArgumentgot a value smaller than its min.numberArgumentNaN(String numberArgumentNaN) Appears when aIntegerArgumentgot a value that isn't anInteger.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.paginatedMenuNext(String paginatedMenuNext) Changes the 'Next' shown at the buttons ofPaginatedMenus.paginatedMenuPage(String paginatedMenuPage) Changes the 'Page 1/?' shown at the buttons ofPaginatedMenus.paginatedMenuPrev(String paginatedMenuPrev) Changes the 'Prev' shown at the buttons ofPaginatedMenus.playerArgumentNotPlayer(String playerArgumentNotPlayer) Appears when aPlayerArgumentgot an invalid player name.Changes the required message, which is a message that appears when the player didn't provide aArgumentPriority.REQUIREDargument.stringArgumentLong(String stringArgumentLong) Appears when aStringArgumentgot a value longer than it's max length.stringArgumentShort(String stringArgumentShort) Appears when aStringArgumentgot a value shorter than it's min length.Changes the usage message, which is a message that appears when the player used a command wrong according to itsSyntax.
-
Constructor Details
-
Builder
public Builder()Creates a new builder.
-
-
Method Details
-
noPermission
Changes the no-permission message. Which is a message that appears when the player tried to execute aBaseCommandor aSubCommand, 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
Changes the usage message, which is a message that appears when the player used a command wrong according to itsSyntax.- Parameters:
usage- Your Usage message to replace with default one.- Returns:
- Itself after changing the usage message.
-
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
Changes the 'Next' shown at the buttons ofPaginatedMenus.- Parameters:
paginatedMenuNext- Your paginated menu's 'Next' button message to replace with the default one.- Returns:
- Itself after changing the paginated menu text.
-
paginatedMenuPrev
Changes the 'Prev' shown at the buttons ofPaginatedMenus.- Parameters:
paginatedMenuPrev- Your paginated menu's 'Prev' button message to replace with the default one.- Returns:
- Itself after changing the paginated menu text.
-
paginatedMenuPage
Changes the 'Page 1/?' shown at the buttons ofPaginatedMenus.- 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
Changes the required message, which is a message that appears when the player didn't provide aArgumentPriority.REQUIREDargument.- Parameters:
required- new required message.- Returns:
- Itself after changing the required message.
-
listArgumentNotValid
Appears when aListArgumentgot an invalid value.- Parameters:
listArgumentNotValid- New message.- Returns:
- itself for continuing to build.
-
numberArgumentIntMin
Appears when aIntegerArgumentgot a value smaller thanInteger.MIN_VALUE.- Parameters:
numberArgumentIntMin- New message- Returns:
- itself for continuing to build.
-
numberArgumentIntMax
Appears when aIntegerArgumentgot a value bigger thanInteger.MAX_VALUE.- Parameters:
numberArgumentIntMax- New message.- Returns:
- itself for continuing to build.
-
numberArgumentMin
Appears when aIntegerArgumentgot a value smaller than its min.- Parameters:
numberArgumentMin- New message.- Returns:
- itself for continuing to build.
-
numberArgumentMax
Appears when aIntegerArgumentgot a value bigger than its max.- Parameters:
numberArgumentMax- New message.- Returns:
- itself for continuing to build.
-
numberArgumentNaN
Appears when aIntegerArgumentgot a value that isn't anInteger.- Parameters:
numberArgumentNaN- New message.- Returns:
- itself for continuing to build.
-
playerArgumentNotPlayer
Appears when aPlayerArgumentgot an invalid player name.- Parameters:
playerArgumentNotPlayer- New message.- Returns:
- itself for continuing to build.
-
stringArgumentShort
Appears when aStringArgumentgot a value shorter than it's min length.- Parameters:
stringArgumentShort- New message.- Returns:
- itself for continuing to build.
-
stringArgumentLong
Appears when aStringArgumentgot a value longer than it's max length.- Parameters:
stringArgumentLong- New message.- Returns:
- itself for continuing to build.
-
build
Builds aMessageConfigurationusing this builder.- Returns:
MessageConfigurationbuilt.
-