mirror of
https://github.com/PikaMug/Quests.git
synced 2025-01-09 18:08:20 +01:00
Activate fail Action during stage of Quests Editor, fixes #1054
This commit is contained in:
parent
cff11e2dae
commit
6fd7973605
@ -805,14 +805,30 @@ public class Quest {
|
|||||||
*
|
*
|
||||||
* @param quester The quester to be ejected
|
* @param quester The quester to be ejected
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public void failQuest(final Quester quester) {
|
public void failQuest(final Quester quester) {
|
||||||
|
failQuest(quester, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Force player to quit quest and inform them of their failure
|
||||||
|
*
|
||||||
|
* @param quester The quester to be ejected
|
||||||
|
* @param ignoreFailAction Whether or not to ignore quest fail Action
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
|
public void failQuest(final Quester quester, final boolean ignoreFailAction) {
|
||||||
final QuesterPreFailQuestEvent preEvent = new QuesterPreFailQuestEvent(quester, this);
|
final QuesterPreFailQuestEvent preEvent = new QuesterPreFailQuestEvent(quester, this);
|
||||||
plugin.getServer().getPluginManager().callEvent(preEvent);
|
plugin.getServer().getPluginManager().callEvent(preEvent);
|
||||||
if (preEvent.isCancelled()) {
|
if (preEvent.isCancelled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final Player player = quester.getPlayer();
|
final Player player = quester.getPlayer();
|
||||||
|
if (!ignoreFailAction) {
|
||||||
|
final Stage stage = quester.getCurrentStage(this);
|
||||||
|
if (stage != null && stage.getFailAction() != null) {
|
||||||
|
quester.getCurrentStage(this).getFailAction().fire(quester, this);
|
||||||
|
}
|
||||||
|
}
|
||||||
final String[] messages = {
|
final String[] messages = {
|
||||||
ChatColor.GOLD + Lang.get(player, "questObjectivesTitle").replace("<quest>", name),
|
ChatColor.GOLD + Lang.get(player, "questObjectivesTitle").replace("<quest>", name),
|
||||||
ChatColor.RED + Lang.get(player, "questFailed")
|
ChatColor.RED + Lang.get(player, "questFailed")
|
||||||
|
@ -493,6 +493,9 @@ public class QuestFactory implements ConversationAbandonedListener {
|
|||||||
if (stage.getFinishAction() != null) {
|
if (stage.getFinishAction() != null) {
|
||||||
context.setSessionData(pref + CK.S_FINISH_EVENT, stage.getFinishAction().getName());
|
context.setSessionData(pref + CK.S_FINISH_EVENT, stage.getFinishAction().getName());
|
||||||
}
|
}
|
||||||
|
if (stage.getFailAction() != null) {
|
||||||
|
context.setSessionData(pref + CK.S_FAIL_EVENT, stage.getFailAction().getName());
|
||||||
|
}
|
||||||
if (stage.getDeathAction() != null) {
|
if (stage.getDeathAction() != null) {
|
||||||
context.setSessionData(pref + CK.S_DEATH_EVENT, stage.getDeathAction().getName());
|
context.setSessionData(pref + CK.S_DEATH_EVENT, stage.getDeathAction().getName());
|
||||||
}
|
}
|
||||||
@ -816,6 +819,8 @@ public class QuestFactory implements ConversationAbandonedListener {
|
|||||||
? context.getSessionData(pref + CK.S_START_EVENT) : null);
|
? context.getSessionData(pref + CK.S_START_EVENT) : null);
|
||||||
stage.set("finish-event", context.getSessionData(pref + CK.S_FINISH_EVENT) != null
|
stage.set("finish-event", context.getSessionData(pref + CK.S_FINISH_EVENT) != null
|
||||||
? context.getSessionData(pref + CK.S_FINISH_EVENT) : null);
|
? context.getSessionData(pref + CK.S_FINISH_EVENT) : null);
|
||||||
|
stage.set("fail-event", context.getSessionData(pref + CK.S_FAIL_EVENT) != null
|
||||||
|
? context.getSessionData(pref + CK.S_FAIL_EVENT) : null);
|
||||||
stage.set("death-event", context.getSessionData(pref + CK.S_DEATH_EVENT) != null
|
stage.set("death-event", context.getSessionData(pref + CK.S_DEATH_EVENT) != null
|
||||||
? context.getSessionData(pref + CK.S_DEATH_EVENT) : null);
|
? context.getSessionData(pref + CK.S_DEATH_EVENT) : null);
|
||||||
stage.set("disconnect-event", context.getSessionData(pref + CK.S_DISCONNECT_EVENT) != null
|
stage.set("disconnect-event", context.getSessionData(pref + CK.S_DISCONNECT_EVENT) != null
|
||||||
|
@ -2861,6 +2861,15 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
|
|||||||
throw new StageFormatException("finish-event failed to load", quest, stageNum);
|
throw new StageFormatException("finish-event failed to load", quest, stageNum);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (config.contains("quests." + questKey + ".stages.ordered." + stageNum + ".fail-event")) {
|
||||||
|
final Action action = loadAction(config.getString("quests." + questKey + ".stages.ordered." + stageNum
|
||||||
|
+ ".fail-event"));
|
||||||
|
if (action != null) {
|
||||||
|
oStage.failAction = action;
|
||||||
|
} else {
|
||||||
|
throw new StageFormatException("fail-event failed to load", quest, stageNum);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (config.contains("quests." + questKey + ".stages.ordered." + stageNum + ".death-event")) {
|
if (config.contains("quests." + questKey + ".stages.ordered." + stageNum + ".death-event")) {
|
||||||
final Action action = loadAction(config.getString("quests." + questKey + ".stages.ordered." + stageNum
|
final Action action = loadAction(config.getString("quests." + questKey + ".stages.ordered." + stageNum
|
||||||
+ ".death-event"));
|
+ ".death-event"));
|
||||||
|
@ -123,11 +123,12 @@ public class Stage {
|
|||||||
protected LinkedList<LinkedList<String>> passwordPhrases = new LinkedList<LinkedList<String>>();
|
protected LinkedList<LinkedList<String>> passwordPhrases = new LinkedList<LinkedList<String>>();
|
||||||
protected String script;
|
protected String script;
|
||||||
protected Action startAction = null;
|
protected Action startAction = null;
|
||||||
|
protected Action finishAction = null;
|
||||||
|
protected Action failAction = null;
|
||||||
protected Action deathAction = null;
|
protected Action deathAction = null;
|
||||||
protected Map<String, Action> chatActions = new HashMap<String, Action>();
|
protected Map<String, Action> chatActions = new HashMap<String, Action>();
|
||||||
protected Map<String, Action> commandActions = new HashMap<String, Action>();
|
protected Map<String, Action> commandActions = new HashMap<String, Action>();
|
||||||
protected Action disconnectAction = null;
|
protected Action disconnectAction = null;
|
||||||
protected Action finishAction = null;
|
|
||||||
protected Condition condition = null;
|
protected Condition condition = null;
|
||||||
protected long delay = -1;
|
protected long delay = -1;
|
||||||
protected String delayMessage = null;
|
protected String delayMessage = null;
|
||||||
@ -411,6 +412,22 @@ public class Stage {
|
|||||||
public void setStartAction(final Action startAction) {
|
public void setStartAction(final Action startAction) {
|
||||||
this.startAction = startAction;
|
this.startAction = startAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Action getFinishAction() {
|
||||||
|
return finishAction;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFinishAction(final Action finishAction) {
|
||||||
|
this.finishAction = finishAction;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Action getFailAction() {
|
||||||
|
return failAction;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFailAction(final Action failAction) {
|
||||||
|
this.failAction = failAction;
|
||||||
|
}
|
||||||
|
|
||||||
public Action getDeathAction() {
|
public Action getDeathAction() {
|
||||||
return deathAction;
|
return deathAction;
|
||||||
@ -443,14 +460,6 @@ public class Stage {
|
|||||||
public void setDisconnectAction(final Action disconnectAction) {
|
public void setDisconnectAction(final Action disconnectAction) {
|
||||||
this.disconnectAction = disconnectAction;
|
this.disconnectAction = disconnectAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Action getFinishAction() {
|
|
||||||
return finishAction;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFinishAction(final Action finishAction) {
|
|
||||||
this.finishAction = finishAction;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Condition getCondition() {
|
public Condition getCondition() {
|
||||||
return condition;
|
return condition;
|
||||||
|
@ -351,7 +351,7 @@ public class Action {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (failQuest == true) {
|
if (failQuest == true) {
|
||||||
quest.failQuest(quester);
|
quest.failQuest(quester, true);
|
||||||
}
|
}
|
||||||
if (timer > 0) {
|
if (timer > 0) {
|
||||||
player.sendMessage(ChatColor.GREEN + Lang.get(player, "timerStart")
|
player.sendMessage(ChatColor.GREEN + Lang.get(player, "timerStart")
|
||||||
|
@ -1166,7 +1166,7 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
|
|||||||
super(context);
|
super(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
private final int size = 7;
|
private final int size = 8;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getSize() {
|
public int getSize() {
|
||||||
@ -1187,8 +1187,9 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
|
|||||||
case 4:
|
case 4:
|
||||||
case 5:
|
case 5:
|
||||||
case 6:
|
case 6:
|
||||||
return ChatColor.BLUE;
|
|
||||||
case 7:
|
case 7:
|
||||||
|
return ChatColor.BLUE;
|
||||||
|
case 8:
|
||||||
return ChatColor.GREEN;
|
return ChatColor.GREEN;
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
@ -1203,14 +1204,16 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
|
|||||||
case 2:
|
case 2:
|
||||||
return ChatColor.YELLOW + Lang.get("stageEditorFinishEvent");
|
return ChatColor.YELLOW + Lang.get("stageEditorFinishEvent");
|
||||||
case 3:
|
case 3:
|
||||||
return ChatColor.YELLOW + Lang.get("stageEditorDeathEvent");
|
return ChatColor.YELLOW + Lang.get("stageEditorFailEvent");
|
||||||
case 4:
|
case 4:
|
||||||
return ChatColor.YELLOW + Lang.get("stageEditorDisconnectEvent");
|
return ChatColor.YELLOW + Lang.get("stageEditorDeathEvent");
|
||||||
case 5:
|
case 5:
|
||||||
return ChatColor.YELLOW + Lang.get("stageEditorChatEvents");
|
return ChatColor.YELLOW + Lang.get("stageEditorDisconnectEvent");
|
||||||
case 6:
|
case 6:
|
||||||
return ChatColor.YELLOW + Lang.get("stageEditorCommandEvents");
|
return ChatColor.YELLOW + Lang.get("stageEditorChatEvents");
|
||||||
case 7:
|
case 7:
|
||||||
|
return ChatColor.YELLOW + Lang.get("stageEditorCommandEvents");
|
||||||
|
case 8:
|
||||||
return ChatColor.GREEN + Lang.get("done");
|
return ChatColor.GREEN + Lang.get("done");
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
@ -1236,20 +1239,27 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
|
|||||||
+ ChatColor.YELLOW + ")\n";
|
+ ChatColor.YELLOW + ")\n";
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
|
if (context.getSessionData(stagePrefix + CK.S_FAIL_EVENT) == null) {
|
||||||
|
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||||
|
} else {
|
||||||
|
return "(" + ChatColor.AQUA + ((String) context.getSessionData(stagePrefix + CK.S_FAIL_EVENT))
|
||||||
|
+ ChatColor.YELLOW + ")\n";
|
||||||
|
}
|
||||||
|
case 4:
|
||||||
if (context.getSessionData(stagePrefix + CK.S_DEATH_EVENT) == null) {
|
if (context.getSessionData(stagePrefix + CK.S_DEATH_EVENT) == null) {
|
||||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||||
} else {
|
} else {
|
||||||
return "(" + ChatColor.AQUA + ((String) context.getSessionData(stagePrefix + CK.S_DEATH_EVENT))
|
return "(" + ChatColor.AQUA + ((String) context.getSessionData(stagePrefix + CK.S_DEATH_EVENT))
|
||||||
+ ChatColor.YELLOW + ")\n";
|
+ ChatColor.YELLOW + ")\n";
|
||||||
}
|
}
|
||||||
case 4:
|
case 5:
|
||||||
if (context.getSessionData(stagePrefix + CK.S_DISCONNECT_EVENT) == null) {
|
if (context.getSessionData(stagePrefix + CK.S_DISCONNECT_EVENT) == null) {
|
||||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||||
} else {
|
} else {
|
||||||
return "(" + ChatColor.AQUA + ((String) context.getSessionData(stagePrefix + CK.S_DISCONNECT_EVENT))
|
return "(" + ChatColor.AQUA + ((String) context.getSessionData(stagePrefix + CK.S_DISCONNECT_EVENT))
|
||||||
+ ChatColor.YELLOW + ")\n";
|
+ ChatColor.YELLOW + ")\n";
|
||||||
}
|
}
|
||||||
case 5:
|
case 6:
|
||||||
if (context.getSessionData(stagePrefix + CK.S_CHAT_EVENTS) == null) {
|
if (context.getSessionData(stagePrefix + CK.S_CHAT_EVENTS) == null) {
|
||||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||||
} else {
|
} else {
|
||||||
@ -1264,7 +1274,7 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
|
|||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
case 6:
|
case 7:
|
||||||
if (context.getSessionData(stagePrefix + CK.S_COMMAND_EVENTS) == null) {
|
if (context.getSessionData(stagePrefix + CK.S_COMMAND_EVENTS) == null) {
|
||||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||||
} else {
|
} else {
|
||||||
@ -1280,7 +1290,7 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
|
|||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
case 7:
|
case 8:
|
||||||
return "";
|
return "";
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
@ -1308,14 +1318,16 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
|
|||||||
case 2:
|
case 2:
|
||||||
return new FinishActionPrompt(context);
|
return new FinishActionPrompt(context);
|
||||||
case 3:
|
case 3:
|
||||||
return new DeathActionPrompt(context);
|
return new FailActionPrompt(context);
|
||||||
case 4:
|
case 4:
|
||||||
return new DisconnectActionPrompt(context);
|
return new DeathActionPrompt(context);
|
||||||
case 5:
|
case 5:
|
||||||
return new ChatActionPrompt(context);
|
return new DisconnectActionPrompt(context);
|
||||||
case 6:
|
case 6:
|
||||||
return new CommandActionPrompt(context);
|
return new ChatActionPrompt(context);
|
||||||
case 7:
|
case 7:
|
||||||
|
return new CommandActionPrompt(context);
|
||||||
|
case 8:
|
||||||
return new StageMainPrompt(stageNum, context);
|
return new StageMainPrompt(stageNum, context);
|
||||||
default:
|
default:
|
||||||
return new ActionListPrompt(context);
|
return new ActionListPrompt(context);
|
||||||
@ -1379,7 +1391,7 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
|
|||||||
return new ActionListPrompt(context);
|
return new ActionListPrompt(context);
|
||||||
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
||||||
context.setSessionData(stagePrefix + CK.S_START_EVENT, null);
|
context.setSessionData(stagePrefix + CK.S_START_EVENT, null);
|
||||||
player.sendMessage(ChatColor.YELLOW + Lang.get("stageEditorStartEventCleared"));
|
player.sendMessage(ChatColor.YELLOW + Lang.get("stageEditorEventCleared"));
|
||||||
return new ActionListPrompt(context);
|
return new ActionListPrompt(context);
|
||||||
} else {
|
} else {
|
||||||
return new StartActionPrompt(context);
|
return new StartActionPrompt(context);
|
||||||
@ -1443,13 +1455,77 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
|
|||||||
return new ActionListPrompt(context);
|
return new ActionListPrompt(context);
|
||||||
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
||||||
context.setSessionData(stagePrefix + CK.S_FINISH_EVENT, null);
|
context.setSessionData(stagePrefix + CK.S_FINISH_EVENT, null);
|
||||||
player.sendMessage(ChatColor.YELLOW + Lang.get("stageEditorFinishEventCleared"));
|
player.sendMessage(ChatColor.YELLOW + Lang.get("stageEditorEventCleared"));
|
||||||
return new ActionListPrompt(context);
|
return new ActionListPrompt(context);
|
||||||
} else {
|
} else {
|
||||||
return new FinishActionPrompt(context);
|
return new FinishActionPrompt(context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class FailActionPrompt extends QuestsEditorStringPrompt {
|
||||||
|
|
||||||
|
public FailActionPrompt(final ConversationContext context) {
|
||||||
|
super(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTitle(final ConversationContext context) {
|
||||||
|
return Lang.get("stageEditorFailEvent");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getQueryText(final ConversationContext context) {
|
||||||
|
return Lang.get("stageEditorEventsPrompt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPromptText(final ConversationContext context) {
|
||||||
|
final QuestsEditorPostOpenStringPromptEvent event = new QuestsEditorPostOpenStringPromptEvent(context, this);
|
||||||
|
context.getPlugin().getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
|
String text = ChatColor.AQUA + "- " + getTitle(context) + " -\n";
|
||||||
|
if (plugin.getActions().isEmpty()) {
|
||||||
|
text += ChatColor.RED + "- " + Lang.get("none");
|
||||||
|
} else {
|
||||||
|
for (final Action a : plugin.getActions()) {
|
||||||
|
text += ChatColor.GREEN + "- " + a.getName() + "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return text + ChatColor.YELLOW + getQueryText(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Prompt acceptInput(final ConversationContext context, final String input) {
|
||||||
|
final Player player = (Player) context.getForWhom();
|
||||||
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
|
Action found = null;
|
||||||
|
for (final Action a : plugin.getActions()) {
|
||||||
|
if (a.getName().equalsIgnoreCase(input)) {
|
||||||
|
found = a;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (found == null) {
|
||||||
|
player.sendMessage(ChatColor.RED + input + ChatColor.YELLOW + " "
|
||||||
|
+ Lang.get("stageEditorInvalidEvent"));
|
||||||
|
return new FailActionPrompt(context);
|
||||||
|
} else {
|
||||||
|
context.setSessionData(stagePrefix + CK.S_FAIL_EVENT, found.getName());
|
||||||
|
return new ActionListPrompt(context);
|
||||||
|
}
|
||||||
|
} else if (input.equalsIgnoreCase(Lang.get("cmdCancel"))) {
|
||||||
|
return new ActionListPrompt(context);
|
||||||
|
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
||||||
|
context.setSessionData(stagePrefix + CK.S_FAIL_EVENT, null);
|
||||||
|
player.sendMessage(ChatColor.YELLOW + Lang.get("stageEditorEventCleared"));
|
||||||
|
return new ActionListPrompt(context);
|
||||||
|
} else {
|
||||||
|
return new FailActionPrompt(context);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public class DeathActionPrompt extends QuestsEditorStringPrompt {
|
public class DeathActionPrompt extends QuestsEditorStringPrompt {
|
||||||
|
|
||||||
@ -1507,7 +1583,7 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
|
|||||||
return new ActionListPrompt(context);
|
return new ActionListPrompt(context);
|
||||||
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
||||||
context.setSessionData(stagePrefix + CK.S_DEATH_EVENT, null);
|
context.setSessionData(stagePrefix + CK.S_DEATH_EVENT, null);
|
||||||
player.sendMessage(ChatColor.YELLOW + Lang.get("stageEditorDeathEventCleared"));
|
player.sendMessage(ChatColor.YELLOW + Lang.get("stageEditorEventCleared"));
|
||||||
return new ActionListPrompt(context);
|
return new ActionListPrompt(context);
|
||||||
} else {
|
} else {
|
||||||
return new DeathActionPrompt(context);
|
return new DeathActionPrompt(context);
|
||||||
@ -1571,7 +1647,7 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
|
|||||||
return new ActionListPrompt(context);
|
return new ActionListPrompt(context);
|
||||||
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
||||||
context.setSessionData(stagePrefix + CK.S_DISCONNECT_EVENT, null);
|
context.setSessionData(stagePrefix + CK.S_DISCONNECT_EVENT, null);
|
||||||
player.sendMessage(ChatColor.YELLOW + Lang.get("stageEditorDisconnectEventCleared"));
|
player.sendMessage(ChatColor.YELLOW + Lang.get("stageEditorEventCleared"));
|
||||||
return new ActionListPrompt(context);
|
return new ActionListPrompt(context);
|
||||||
} else {
|
} else {
|
||||||
return new DisconnectActionPrompt(context);
|
return new DisconnectActionPrompt(context);
|
||||||
|
@ -37,7 +37,7 @@ public class ActionTimer extends BukkitRunnable {
|
|||||||
public void run() {
|
public void run() {
|
||||||
quester.removeTimer(getTaskId());
|
quester.removeTimer(getTaskId());
|
||||||
if (last) {
|
if (last) {
|
||||||
quest.failQuest(quester);
|
quest.failQuest(quester, false);
|
||||||
quester.updateJournal();
|
quester.updateJournal();
|
||||||
} else {
|
} else {
|
||||||
quester.getPlayer().sendMessage(ChatColor.GREEN + Lang.get(quester.getPlayer(), "timerMessage")
|
quester.getPlayer().sendMessage(ChatColor.GREEN + Lang.get(quester.getPlayer(), "timerMessage")
|
||||||
|
@ -92,6 +92,7 @@ public class CK {
|
|||||||
public static final String S_SHEAR_AMOUNTS = "shearAmounts";
|
public static final String S_SHEAR_AMOUNTS = "shearAmounts";
|
||||||
public static final String S_START_EVENT = "startEvent";
|
public static final String S_START_EVENT = "startEvent";
|
||||||
public static final String S_FINISH_EVENT = "finishEvent";
|
public static final String S_FINISH_EVENT = "finishEvent";
|
||||||
|
public static final String S_FAIL_EVENT = "failEvent";
|
||||||
public static final String S_CHAT_EVENTS = "chatEvents";
|
public static final String S_CHAT_EVENTS = "chatEvents";
|
||||||
public static final String S_CHAT_EVENT_TRIGGERS = "chatEventTriggers";
|
public static final String S_CHAT_EVENT_TRIGGERS = "chatEventTriggers";
|
||||||
public static final String S_CHAT_TEMP_EVENT = "chatTempEvent";
|
public static final String S_CHAT_TEMP_EVENT = "chatTempEvent";
|
||||||
|
@ -144,22 +144,18 @@ stageEditorShearSheep: "Shear sheep"
|
|||||||
stageEditorKillPlayers: "Kill players"
|
stageEditorKillPlayers: "Kill players"
|
||||||
stageEditorPlayers: "players"
|
stageEditorPlayers: "players"
|
||||||
stageEditorEvents: "Actions"
|
stageEditorEvents: "Actions"
|
||||||
|
stageEditorEventCleared: "Action cleared."
|
||||||
stageEditorStageEvents: "Stage Actions"
|
stageEditorStageEvents: "Stage Actions"
|
||||||
stageEditorStartEvent: "Start Action"
|
stageEditorStartEvent: "Start Action"
|
||||||
stageEditorStartEventCleared: "Start action cleared."
|
|
||||||
stageEditorFinishEvent: "Finish Action"
|
stageEditorFinishEvent: "Finish Action"
|
||||||
stageEditorFinishEventCleared: "Finish action cleared."
|
stageEditorFinishEvent: "Fail Action"
|
||||||
stageEditorChatEvents: "Chat Action"
|
stageEditorChatEvents: "Chat Action"
|
||||||
stageEditorChatTrigger: "Chat Trigger"
|
stageEditorChatTrigger: "Chat Trigger"
|
||||||
stageEditorChatEventsCleared: "Chat action cleared."
|
|
||||||
stageEditorCommandEvents: "Command Action"
|
stageEditorCommandEvents: "Command Action"
|
||||||
stageEditorCommandTrigger: "Command Trigger"
|
stageEditorCommandTrigger: "Command Trigger"
|
||||||
stageEditorCommandEventsCleared: "Command action cleared."
|
|
||||||
stageEditorTriggeredBy: "Triggered by"
|
stageEditorTriggeredBy: "Triggered by"
|
||||||
stageEditorDeathEvent: "Death Action"
|
stageEditorDeathEvent: "Death Action"
|
||||||
stageEditorDeathEventCleared: "Death action cleared."
|
|
||||||
stageEditorDisconnectEvent: "Disconnect Action"
|
stageEditorDisconnectEvent: "Disconnect Action"
|
||||||
stageEditorDisconnectEventCleared: "Disconnect action cleared."
|
|
||||||
stageEditorConditions: "Conditions"
|
stageEditorConditions: "Conditions"
|
||||||
stageEditorConditionCleared: "Condition cleared."
|
stageEditorConditionCleared: "Condition cleared."
|
||||||
stageEditorDelayMessage: "Delay message"
|
stageEditorDelayMessage: "Delay message"
|
||||||
|
Loading…
Reference in New Issue
Block a user