Prompt formatting cleanup

This commit is contained in:
PikaMug 2023-02-26 12:40:56 -05:00
parent 7f2430441a
commit fcdff55310
7 changed files with 21 additions and 22 deletions

View File

@ -269,10 +269,8 @@ public class EntityPrompt extends ConditionsEditorNumericPrompt {
final Set<UUID> selectingNpcs = plugin.getQuestFactory().getSelectingNpcs();
selectingNpcs.add(((Player) context.getForWhom()).getUniqueId());
plugin.getQuestFactory().setSelectingNpcs(selectingNpcs);
return ChatColor.YELLOW + getQueryText(context) + "\n" + ChatColor.GOLD + Lang.get("npcHint");
} else {
return ChatColor.YELLOW + getQueryText(context);
}
return ChatColor.YELLOW + getQueryText(context);
}
@Override

View File

@ -92,9 +92,9 @@ public class OptionsPrompt extends QuestsEditorNumericPrompt {
context.getPlugin().getServer().getPluginManager().callEvent(event);
}
final StringBuilder text = new StringBuilder(ChatColor.DARK_GREEN + getTitle(context)
final StringBuilder text = new StringBuilder(ChatColor.DARK_GREEN + "- " + getTitle(context)
.replace((String) Objects.requireNonNull(context.getSessionData(CK.Q_NAME)), ChatColor.AQUA
+ (String) context.getSessionData(CK.Q_NAME) + ChatColor.DARK_GREEN));
+ (String) context.getSessionData(CK.Q_NAME) + ChatColor.DARK_GREEN) + " -");
for (int i = 1; i <= size; i++) {
text.append("\n").append(getNumberColor(context, i)).append(ChatColor.BOLD).append(i)
.append(ChatColor.RESET).append(" - ").append(getSelectionText(context, i));

View File

@ -164,8 +164,9 @@ public class PlannerPrompt extends QuestsEditorNumericPrompt {
}
final String name = Objects.requireNonNull((String) context.getSessionData(CK.Q_NAME));
final StringBuilder text = new StringBuilder(ChatColor.DARK_AQUA + getTitle(context)
.replace(name, ChatColor.AQUA + (String) context.getSessionData(CK.Q_NAME) + ChatColor.DARK_AQUA));
final StringBuilder text = new StringBuilder(ChatColor.DARK_AQUA + "- " + getTitle(context)
.replace(name, ChatColor.AQUA + (String) context.getSessionData(CK.Q_NAME) + ChatColor.DARK_AQUA)
+ " -");
for (int i = 1; i <= size; i++) {
text.append("\n").append(getNumberColor(context, i)).append(ChatColor.BOLD).append(i)
.append(ChatColor.RESET).append(" - ").append(getSelectionText(context, i)).append(" ")

View File

@ -360,9 +360,9 @@ public class RequirementsPrompt extends QuestsEditorNumericPrompt {
context.getPlugin().getServer().getPluginManager().callEvent(event);
}
final StringBuilder text = new StringBuilder(ChatColor.DARK_AQUA + getTitle(context).replace((String) Objects
.requireNonNull(context.getSessionData(CK.Q_NAME)), ChatColor.AQUA
+ (String) context.getSessionData(CK.Q_NAME) + ChatColor.DARK_AQUA));
final StringBuilder text = new StringBuilder(ChatColor.DARK_AQUA + "- " + getTitle(context)
.replace((String) Objects.requireNonNull(context.getSessionData(CK.Q_NAME)), ChatColor.AQUA
+ (String) context.getSessionData(CK.Q_NAME) + ChatColor.DARK_AQUA) + " -");
for (int i = 1; i <= size; i++) {
text.append("\n").append(getNumberColor(context, i)).append(ChatColor.BOLD).append(i)
.append(ChatColor.RESET).append(" - ").append(getSelectionText(context, i)).append(" ")

View File

@ -379,9 +379,9 @@ public class RewardsPrompt extends QuestsEditorNumericPrompt {
context.getPlugin().getServer().getPluginManager().callEvent(event);
}
final StringBuilder text = new StringBuilder(ChatColor.LIGHT_PURPLE + getTitle(context).replace((String) Objects
.requireNonNull(context.getSessionData(CK.Q_NAME)), ChatColor.AQUA + (String) context
.getSessionData(CK.Q_NAME) + ChatColor.LIGHT_PURPLE));
final StringBuilder text = new StringBuilder(ChatColor.LIGHT_PURPLE + "- " + getTitle(context)
.replace((String) Objects.requireNonNull(context.getSessionData(CK.Q_NAME)), ChatColor.AQUA
+ (String) context.getSessionData(CK.Q_NAME) + ChatColor.LIGHT_PURPLE) + " -");
for (int i = 1; i <= size; i++) {
text.append("\n").append(getNumberColor(context, i)).append(ChatColor.BOLD).append(i)
.append(ChatColor.RESET).append(" - ").append(getSelectionText(context, i)).append(" ")

View File

@ -686,7 +686,7 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
switch(number) {
case 1:
if (context.getSessionData(stagePrefix + CK.S_REACH_LOCATIONS) == null) {
return ChatColor.GRAY + " (" + Lang.get("noneSet") + ")";
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
} else {
final StringBuilder text = new StringBuilder();
final List<String> locations
@ -701,7 +701,7 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
}
case 2:
if (context.getSessionData(stagePrefix + CK.S_REACH_LOCATIONS_RADIUS) == null) {
return ChatColor.GRAY + " (" + Lang.get("noneSet") + ")";
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
} else {
final StringBuilder text = new StringBuilder();
final List<Integer> radius
@ -715,7 +715,7 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
}
case 3:
if (context.getSessionData(stagePrefix + CK.S_REACH_LOCATIONS_NAMES) == null) {
return ChatColor.GRAY + " (" + Lang.get("noneSet") + ")";
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
} else {
final StringBuilder text = new StringBuilder();
final List<String> names
@ -1051,7 +1051,7 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
switch(number) {
case 1:
if (context.getSessionData(stagePrefix + CK.S_PASSWORD_DISPLAYS) == null) {
return ChatColor.GRAY + " (" + Lang.get("noneSet") + ")";
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
} else {
final StringBuilder text = new StringBuilder();
final List<String> displays = (List<String>) context.getSessionData(stagePrefix
@ -1066,7 +1066,7 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
}
case 2:
if (context.getSessionData(stagePrefix + CK.S_PASSWORD_PHRASES) == null) {
return ChatColor.GRAY + " (" + Lang.get("noneSet") + ")";
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
} else {
final StringBuilder text = new StringBuilder();
final List<String> phrases = (List<String>) context.getSessionData(stagePrefix

View File

@ -596,10 +596,10 @@ eventDeleteTitle: "- Delete Action -"
conditionCreateTitle: "- Create Condition -"
conditionEditTitle: "- Edit Condition -"
conditionDeleteTitle: "- Delete Condition -"
requirementsTitle: "- <quest> | Requirements -"
rewardsTitle: "- <quest> | Rewards -"
plannerTitle: "- <quest> | Planner -"
optionsTitle: "- <quest> | Options -"
requirementsTitle: "Requirements | <quest>"
rewardsTitle: "Rewards | <quest> "
plannerTitle: "Planner | <quest>"
optionsTitle: "Options | <quest>"
itemRequirementsTitle: "- Item Requirements -"
itemRewardsTitle: "- Item Rewards -"
permissionRewardsTitle: "- Permission Rewards -"