public class Quest
extends java.lang.Object
| Constructor and Description |
|---|
Quest(int code,
@NotNull java.lang.String title,
int face,
boolean replay,
int parent,
boolean end,
@NotNull java.lang.String step)
Create a new quest.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addQuestListener(@NotNull QuestListener listener)
Adds a
QuestListener to be notified of changes. |
int |
getCode()
Get the quest's code.
|
int |
getFace()
Get the quest's face.
|
@NotNull java.lang.String |
getTitle()
Get the quest's title.
|
@NotNull java.lang.String |
getTooltipText()
Returns a description for this spell to be used in tooltips.
|
boolean |
isCompleted() |
void |
removeQuestListener(@NotNull QuestListener listener)
Removes a
QuestListener to be notified of changes. |
boolean |
replayable() |
void |
setStep(boolean end,
@NotNull java.lang.String step)
Update the quest's state.
|
public Quest(int code,
@NotNull
@NotNull java.lang.String title,
int face,
boolean replay,
int parent,
boolean end,
@NotNull
@NotNull java.lang.String step)
code - the quest internal codetitle - the quest's titleface - the quest's facereplay - if 1 the quest can be replayedparent - quest internal code of this quest's parent, 0 if no
parent.end - if 1 the quest is completedstep - current quest's steppublic int getCode()
@NotNull public @NotNull java.lang.String getTitle()
public int getFace()
public boolean isCompleted()
public boolean replayable()
public void setStep(boolean end,
@NotNull
@NotNull java.lang.String step)
end - if true the quest is completedstep - step description@NotNull public @NotNull java.lang.String getTooltipText()
public void addQuestListener(@NotNull
@NotNull QuestListener listener)
QuestListener to be notified of changes.listener - the listener to addpublic void removeQuestListener(@NotNull
@NotNull QuestListener listener)
QuestListener to be notified of changes.listener - the listener to remove