87 lines
1.8 KiB
Markdown
87 lines
1.8 KiB
Markdown
# IMappetQuests.isComplete
|
|
|
|
[← IMappetQuests](index.md) · [← Master](../../wiki.md)
|
|
|
|
Parça 1/2 · [sonraki](isComplete-2.md)
|
|
|
|
isComplete(java.lang.String id)
|
|
|
|
boolean Check whether a quest by given ID can be completed.
|
|
|
|
Method Detail
|
|
has
|
|
|
|
boolean has(java.lang.String id)
|
|
|
|
Check whether these quests have a quest by given ID.
|
|
|
|
|
|
|
|
if (c.getSubject().getQuests().has("important_quest"))
|
|
{
|
|
// § is section symbol
|
|
c.getSubject().send("You can't do this until you finish §6Important quest§r!");
|
|
}
|
|
|
|
|
|
add
|
|
|
|
boolean add(java.lang.String id)
|
|
|
|
Add a quest into these quests by given ID.
|
|
|
|
if (c.getSubject().getQuests().add("important_quest"))
|
|
{
|
|
c.getSubject().send("Check your quests!");
|
|
}
|
|
else
|
|
{
|
|
c.getSubject().send("You already have this quest, huh...");
|
|
}
|
|
|
|
|
|
Returns:
|
|
true if a quest was successfully added, false if player has already this quest, or if the quest doesn't
|
|
exist.
|
|
|
|
isComplete
|
|
|
|
boolean isComplete(java.lang.String id)
|
|
|
|
Check whether a quest by given ID can be completed.
|
|
|
|
if (c.getSubject().getQuests().isComplete("important_quest"))
|
|
{
|
|
c.getSubject().send("I think you should bring this quest back to Steve!");
|
|
}
|
|
|
|
|
|
complete
|
|
|
|
boolean complete(java.lang.String id)
|
|
|
|
Complete (and reward) the quest in these quests by given ID.
|
|
|
|
if (c.getSubject().getQuests().complete("important_quest"))
|
|
{
|
|
c.getSubject().send("Important quest was successfully completed!");
|
|
}
|
|
else
|
|
{
|
|
c.getSubject().send("Finish your objectives first...");
|
|
}
|
|
|
|
|
|
Returns:
|
|
true if player was rewarded and quest was removed from the quests list, false if the quest by given
|
|
ID isn't present.
|
|
|
|
decline
|
|
|
|
boolean decline(java.lang.String id)
|
|
|
|
Remove the quest from these quests by given ID.
|
|
|
|
if (c.getSubject().getQuests().decline("important_quest"))
|
|
{
|