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
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aMessageConfiguration
using this builder.listArgumentNotValid
(String listArgumentNotValid) Appears when aListArgument
got an invalid value.noPermission
(String noPerm) Changes the no-permission message.numberArgumentIntMax
(String numberArgumentIntMax) Appears when aIntegerArgument
got a value bigger thanInteger.MAX_VALUE
.numberArgumentIntMin
(String numberArgumentIntMin) Appears when aIntegerArgument
got a value smaller thanInteger.MIN_VALUE
.numberArgumentMax
(String numberArgumentMax) Appears when aIntegerArgument
got a value bigger than its max.numberArgumentMin
(String numberArgumentMin) Appears when aIntegerArgument
got a value smaller than its min.numberArgumentNaN
(String numberArgumentNaN) Appears when aIntegerArgument
got 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 ofPaginatedMenu
s.paginatedMenuPage
(String paginatedMenuPage) Changes the 'Page 1/?' shown at the buttons ofPaginatedMenu
s.paginatedMenuPrev
(String paginatedMenuPrev) Changes the 'Prev' shown at the buttons ofPaginatedMenu
s.playerArgumentNotPlayer
(String playerArgumentNotPlayer) Appears when aPlayerArgument
got an invalid player name.Changes the required message, which is a message that appears when the player didn't provide aArgumentPriority.REQUIRED
argument.stringArgumentLong
(String stringArgumentLong) Appears when aStringArgument
got a value longer than it's max length.stringArgumentShort
(String stringArgumentShort) Appears when aStringArgument
got 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 aBaseCommand
or 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 ofPaginatedMenu
s.- 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 ofPaginatedMenu
s.- 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 ofPaginatedMenu
s.- 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.REQUIRED
argument.- Parameters:
required
- new required message.- Returns:
- Itself after changing the required message.
-
listArgumentNotValid
Appears when aListArgument
got an invalid value.- Parameters:
listArgumentNotValid
- New message.- Returns:
- itself for continuing to build.
-
numberArgumentIntMin
Appears when aIntegerArgument
got a value smaller thanInteger.MIN_VALUE
.- Parameters:
numberArgumentIntMin
- New message- Returns:
- itself for continuing to build.
-
numberArgumentIntMax
Appears when aIntegerArgument
got a value bigger thanInteger.MAX_VALUE
.- Parameters:
numberArgumentIntMax
- New message.- Returns:
- itself for continuing to build.
-
numberArgumentMin
Appears when aIntegerArgument
got a value smaller than its min.- Parameters:
numberArgumentMin
- New message.- Returns:
- itself for continuing to build.
-
numberArgumentMax
Appears when aIntegerArgument
got a value bigger than its max.- Parameters:
numberArgumentMax
- New message.- Returns:
- itself for continuing to build.
-
numberArgumentNaN
Appears when aIntegerArgument
got a value that isn't anInteger
.- Parameters:
numberArgumentNaN
- New message.- Returns:
- itself for continuing to build.
-
playerArgumentNotPlayer
Appears when aPlayerArgument
got an invalid player name.- Parameters:
playerArgumentNotPlayer
- New message.- Returns:
- itself for continuing to build.
-
stringArgumentShort
Appears when aStringArgument
got a value shorter than it's min length.- Parameters:
stringArgumentShort
- New message.- Returns:
- itself for continuing to build.
-
stringArgumentLong
Appears when aStringArgument
got a value longer than it's max length.- Parameters:
stringArgumentLong
- New message.- Returns:
- itself for continuing to build.
-
build
Builds aMessageConfiguration
using this builder.- Returns:
MessageConfiguration
built.
-