public class Choice
extends java.lang.Object
Choice.ChoiceBuilder because of its automatic use of the handleMap.
Created by Hiroku
| Modifier and Type | Class and Description |
|---|---|
static class |
Choice.ChoiceBuilder |
| Modifier and Type | Field and Description |
|---|---|
int |
choiceID
The runtime-unique ID for this choice.
|
java.util.function.Consumer<DialogueChoiceEvent> |
handle |
static java.util.HashMap<java.util.UUID,java.util.HashMap<java.lang.Integer,java.util.function.Consumer<DialogueChoiceEvent>>> |
handleMap
A server-held mapping from
choiceID to the handler of the event. |
java.lang.String |
text
The display text for the choice.
|
| Constructor and Description |
|---|
Choice(io.netty.buffer.ByteBuf buffer) |
Choice(io.netty.buffer.ByteBuf buffer,
boolean localized) |
Choice(io.netty.buffer.ByteBuf buffer,
QuestProgressClient quest) |
Choice(java.lang.String text,
java.util.function.Consumer<DialogueChoiceEvent> handle) |
Choice(java.lang.String text,
java.util.function.Consumer<DialogueChoiceEvent> handle,
int choiceID) |
| Modifier and Type | Method and Description |
|---|---|
static Choice.ChoiceBuilder |
builder() |
void |
toBytes(io.netty.buffer.ByteBuf buffer) |
public static final java.util.HashMap<java.util.UUID,java.util.HashMap<java.lang.Integer,java.util.function.Consumer<DialogueChoiceEvent>>> handleMap
choiceID to the handler of the event. This is used implicitly through
the Choice.ChoiceBuilder, and as such modifying this directly is not recommended.public final int choiceID
public final java.lang.String text
public final java.util.function.Consumer<DialogueChoiceEvent> handle
public Choice(java.lang.String text,
java.util.function.Consumer<DialogueChoiceEvent> handle)
public Choice(java.lang.String text,
java.util.function.Consumer<DialogueChoiceEvent> handle,
int choiceID)
public Choice(io.netty.buffer.ByteBuf buffer)
public Choice(io.netty.buffer.ByteBuf buffer,
boolean localized)
public Choice(io.netty.buffer.ByteBuf buffer,
QuestProgressClient quest)
public void toBytes(io.netty.buffer.ByteBuf buffer)
public static Choice.ChoiceBuilder builder()