Player.Commands.Builder
@UnstableApi
class Player.Commands.Builder
A builder for Commands instances.
Summary
Public constructors |
|---|
Builder()Creates a builder. |
Public functions |
|
|---|---|
Player.Commands.Builder! |
@CanIgnoreReturnValueAdds a |
Player.Commands.Builder! |
@CanIgnoreReturnValueAdds |
Player.Commands.Builder! |
@CanIgnoreReturnValueAdds |
Player.Commands.Builder! |
Adds all existing |
Player.Commands.Builder! |
@CanIgnoreReturnValueAdds a |
Player.Commands! |
build()Builds a |
Player.Commands.Builder! |
@CanIgnoreReturnValueRemoves a |
Player.Commands.Builder! |
@CanIgnoreReturnValueRemoves |
Player.Commands.Builder! |
@CanIgnoreReturnValueRemoves a |
Public constructors
Public functions
add
@CanIgnoreReturnValue
fun add(@Player.Command command: Int): Player.Commands.Builder!
Adds a Command.
| Parameters | |
|---|---|
@Player.Command command: Int |
A |
| Returns | |
|---|---|
Player.Commands.Builder! |
This builder. |
| Throws | |
|---|---|
java.lang.IllegalStateException |
If |
addAll
@CanIgnoreReturnValue
fun addAll(@Player.Command commands: IntArray!): Player.Commands.Builder!
Adds commands.
| Parameters | |
|---|---|
@Player.Command commands: IntArray! |
The |
| Returns | |
|---|---|
Player.Commands.Builder! |
This builder. |
| Throws | |
|---|---|
java.lang.IllegalStateException |
If |
addAll
@CanIgnoreReturnValue
fun addAll(commands: Player.Commands!): Player.Commands.Builder!
Adds Commands.
| Parameters | |
|---|---|
commands: Player.Commands! |
The set of |
| Returns | |
|---|---|
Player.Commands.Builder! |
This builder. |
| Throws | |
|---|---|
java.lang.IllegalStateException |
If |
addAllCommands
@CanIgnoreReturnValue
fun addAllCommands(): Player.Commands.Builder!
Adds all existing commands.
| Returns | |
|---|---|
Player.Commands.Builder! |
This builder. |
| Throws | |
|---|---|
java.lang.IllegalStateException |
If |
addIf
@CanIgnoreReturnValue
fun addIf(@Player.Command command: Int, condition: Boolean): Player.Commands.Builder!
Adds a Command if the provided condition is true. Does nothing otherwise.
| Parameters | |
|---|---|
@Player.Command command: Int |
A |
condition: Boolean |
A condition. |
| Returns | |
|---|---|
Player.Commands.Builder! |
This builder. |
| Throws | |
|---|---|
java.lang.IllegalStateException |
If |
build
fun build(): Player.Commands!
Builds a Commands instance.
| Throws | |
|---|---|
java.lang.IllegalStateException |
If this method has already been called. |
remove
@CanIgnoreReturnValue
fun remove(@Player.Command command: Int): Player.Commands.Builder!
Removes a Command.
| Parameters | |
|---|---|
@Player.Command command: Int |
A |
| Returns | |
|---|---|
Player.Commands.Builder! |
This builder. |
| Throws | |
|---|---|
java.lang.IllegalStateException |
If |
removeAll
@CanIgnoreReturnValue
fun removeAll(@Player.Command commands: IntArray!): Player.Commands.Builder!
Removes commands.
| Parameters | |
|---|---|
@Player.Command commands: IntArray! |
The |
| Returns | |
|---|---|
Player.Commands.Builder! |
This builder. |
| Throws | |
|---|---|
java.lang.IllegalStateException |
If |
removeIf
@CanIgnoreReturnValue
fun removeIf(@Player.Command command: Int, condition: Boolean): Player.Commands.Builder!
Removes a Command if the provided condition is true. Does nothing otherwise.
| Parameters | |
|---|---|
@Player.Command command: Int |
A |
condition: Boolean |
A condition. |
| Returns | |
|---|---|
Player.Commands.Builder! |
This builder. |
| Throws | |
|---|---|
java.lang.IllegalStateException |
If |