mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-24 11:38:42 +01:00
Supply external conversation hooks, part 13
This commit is contained in:
parent
15db4cc996
commit
bb494263a3
@ -233,7 +233,7 @@ public class QuestFactory implements ConversationAbandonedListener {
|
||||
}
|
||||
|
||||
public String getTitle(ConversationContext context) {
|
||||
return ChatColor.GOLD + Lang.get("quest") + ": " + ChatColor.AQUA + context.getSessionData(CK.Q_NAME);
|
||||
return Lang.get("quest") + ": " + context.getSessionData(CK.Q_NAME);
|
||||
}
|
||||
|
||||
public ChatColor getNumberColor(ConversationContext context, int number) {
|
||||
@ -415,7 +415,7 @@ public class QuestFactory implements ConversationAbandonedListener {
|
||||
QuestsEditorPostOpenCreatePromptEvent event = new QuestsEditorPostOpenCreatePromptEvent(context);
|
||||
plugin.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
String text = ChatColor.GOLD + "- " + getTitle(context) + ChatColor.GOLD + " -\n";
|
||||
String text = ChatColor.GOLD + "- " + getTitle(context).replaceFirst(": ", ": " + ChatColor.AQUA) + ChatColor.GOLD + " -\n";
|
||||
for (int i = 1; i <= size; i++) {
|
||||
text += getNumberColor(context, i) + "" + ChatColor.BOLD + i + ChatColor.RESET + " - " + getSelectionText(context, i) + " " + getAdditionalText(context, i) + "\n";
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ public class CreateStagePrompt extends NumericPrompt {
|
||||
}
|
||||
|
||||
public String getTitle(ConversationContext context) {
|
||||
return ChatColor.AQUA + (String) context.getSessionData(CK.Q_NAME) + ChatColor.LIGHT_PURPLE + " | " + Lang.get("stageEditorStage") + " " + stageNum;
|
||||
return (String) context.getSessionData(CK.Q_NAME) + " | " + Lang.get("stageEditorStage") + " " + stageNum;
|
||||
}
|
||||
|
||||
public ChatColor getNumberColor(ConversationContext context, int number) {
|
||||
@ -376,7 +376,7 @@ public class CreateStagePrompt extends NumericPrompt {
|
||||
QuestsEditorPostOpenCreateStagePromptEvent event = new QuestsEditorPostOpenCreateStagePromptEvent(questFactory, stageNum, context);
|
||||
plugin.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
String text = ChatColor.LIGHT_PURPLE + "- " + getTitle(context) + " -\n";
|
||||
String text = ChatColor.LIGHT_PURPLE + "- " + ChatColor.AQUA + getTitle(context).replaceFirst(" \\| ", ChatColor.LIGHT_PURPLE + " | ") + " -\n";
|
||||
for (int i = 1; i <= size; i++) {
|
||||
text += getNumberColor(context, i) + "" + ChatColor.BOLD + i + ChatColor.RESET + " - " + getSelectionText(context, i) + " " + getAdditionalText(context, i) + "\n";
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ public class GUIDisplayPrompt extends NumericPrompt {
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return ChatColor.GOLD + Lang.get("questGUITitle");
|
||||
return Lang.get("questGUITitle");
|
||||
}
|
||||
|
||||
public ChatColor getNumberColor(ConversationContext context, int number) {
|
||||
@ -83,7 +83,7 @@ public class GUIDisplayPrompt extends NumericPrompt {
|
||||
}
|
||||
context.setSessionData("tempStack", null);
|
||||
}
|
||||
String text = getTitle() + "\n";
|
||||
String text = ChatColor.GOLD + getTitle() + "\n";
|
||||
if (context.getSessionData(CK.Q_GUIDISPLAY) != null) {
|
||||
ItemStack stack = (ItemStack) context.getSessionData(CK.Q_GUIDISPLAY);
|
||||
text += " " + ChatColor.RESET + ItemUtil.getDisplayString(stack) + "\n";
|
||||
|
@ -48,7 +48,7 @@ public class OptionsPrompt extends NumericPrompt {
|
||||
}
|
||||
|
||||
public String getTitle(ConversationContext context) {
|
||||
return ChatColor.DARK_GREEN + Lang.get("optionsTitle").replace("<quest>", ChatColor.AQUA + (String) context.getSessionData(CK.Q_NAME) + ChatColor.DARK_GREEN);
|
||||
return Lang.get("optionsTitle").replace("<quest>", (String) context.getSessionData(CK.Q_NAME));
|
||||
}
|
||||
|
||||
public ChatColor getNumberColor(ConversationContext context, int number) {
|
||||
@ -82,7 +82,7 @@ public class OptionsPrompt extends NumericPrompt {
|
||||
QuestsEditorPostOpenOptionsPromptEvent event = new QuestsEditorPostOpenOptionsPromptEvent(factory, context);
|
||||
plugin.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
String text = getTitle(context) + "\n";
|
||||
String text = ChatColor.DARK_GREEN + getTitle(context).replace((String) context.getSessionData(CK.Q_NAME), ChatColor.AQUA + (String) context.getSessionData(CK.Q_NAME) + ChatColor.DARK_GREEN) + "\n";
|
||||
for (int i = 1; i <= size; i++) {
|
||||
text += getNumberColor(context, i) + "" + ChatColor.BOLD + i + ChatColor.RESET + " - " + getSelectionText(context, i) + "\n";
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ public class PlannerPrompt extends NumericPrompt {
|
||||
}
|
||||
|
||||
public String getTitle(ConversationContext context) {
|
||||
return ChatColor.DARK_AQUA + Lang.get("plannerTitle").replace("<quest>", ChatColor.AQUA + (String) context.getSessionData(CK.Q_NAME) + ChatColor.DARK_AQUA);
|
||||
return Lang.get("plannerTitle").replace("<quest>", (String) context.getSessionData(CK.Q_NAME));
|
||||
}
|
||||
|
||||
public ChatColor getNumberColor(ConversationContext context, int number) {
|
||||
@ -134,7 +134,7 @@ public class PlannerPrompt extends NumericPrompt {
|
||||
QuestsEditorPostOpenPlannerPromptEvent event = new QuestsEditorPostOpenPlannerPromptEvent(factory, context);
|
||||
plugin.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
String text = getTitle(context) + "\n";
|
||||
String text = ChatColor.DARK_AQUA + getTitle(context).replace((String) context.getSessionData(CK.Q_NAME), ChatColor.AQUA + (String) context.getSessionData(CK.Q_NAME) + ChatColor.DARK_AQUA) + "\n";
|
||||
for (int i = 1; i <= size; i++) {
|
||||
text += getNumberColor(context, i) + "" + ChatColor.BOLD + i + ChatColor.RESET + " - " + getSelectionText(context, i) + " " + getAdditionalText(context, i) + "\n";
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ public class RequirementsPrompt extends NumericPrompt {
|
||||
}
|
||||
|
||||
public String getTitle(ConversationContext context) {
|
||||
return ChatColor.DARK_AQUA + Lang.get("requirementsTitle").replace("<quest>", ChatColor.AQUA + (String) context.getSessionData(CK.Q_NAME) + ChatColor.DARK_AQUA);
|
||||
return Lang.get("requirementsTitle").replace("<quest>", (String) context.getSessionData(CK.Q_NAME));
|
||||
}
|
||||
|
||||
public ChatColor getNumberColor(ConversationContext context, int number) {
|
||||
@ -269,7 +269,7 @@ public class RequirementsPrompt extends NumericPrompt {
|
||||
QuestsEditorPostOpenRequirementsPromptEvent event = new QuestsEditorPostOpenRequirementsPromptEvent(factory, context);
|
||||
plugin.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
String text = getTitle(context) + "\n";
|
||||
String text = ChatColor.DARK_AQUA + getTitle(context).replace((String) context.getSessionData(CK.Q_NAME), ChatColor.AQUA + (String) context.getSessionData(CK.Q_NAME) + ChatColor.DARK_AQUA) + "\n";
|
||||
for (int i = 1; i <= size; i++) {
|
||||
text += getNumberColor(context, i) + "" + ChatColor.BOLD + i + ChatColor.RESET + " - " + getSelectionText(context, i) + " " + getAdditionalText(context, i) + "\n";
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ public class RewardsPrompt extends NumericPrompt {
|
||||
}
|
||||
|
||||
public String getTitle(ConversationContext context) {
|
||||
return ChatColor.LIGHT_PURPLE + Lang.get("rewardsTitle").replace("<quest>", ChatColor.AQUA + (String) context.getSessionData(CK.Q_NAME) + ChatColor.LIGHT_PURPLE);
|
||||
return Lang.get("rewardsTitle").replace("<quest>", (String) context.getSessionData(CK.Q_NAME));
|
||||
}
|
||||
|
||||
public ChatColor getNumberColor(ConversationContext context, int number) {
|
||||
@ -256,7 +256,7 @@ public class RewardsPrompt extends NumericPrompt {
|
||||
QuestsEditorPostOpenRewardsPromptEvent event = new QuestsEditorPostOpenRewardsPromptEvent(factory, context);
|
||||
plugin.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
String text = getTitle(context) + "\n";
|
||||
String text = ChatColor.LIGHT_PURPLE + getTitle(context).replace((String) context.getSessionData(CK.Q_NAME), ChatColor.AQUA + (String) context.getSessionData(CK.Q_NAME) + ChatColor.LIGHT_PURPLE) + "\n";
|
||||
for (int i = 1; i <= size; i++) {
|
||||
text += getNumberColor(context, i) + "" + ChatColor.BOLD + i + ChatColor.RESET + " - " + getSelectionText(context, i) + " " + getAdditionalText(context, i) + "\n";
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ public class StagesPrompt extends NumericPrompt {
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return ChatColor.LIGHT_PURPLE + Lang.get("stageEditorStages");
|
||||
return Lang.get("stageEditorStages");
|
||||
}
|
||||
|
||||
public ChatColor getNumberColor(ConversationContext context, int number) {
|
||||
|
Loading…
Reference in New Issue
Block a user