mirror of
https://github.com/PikaMug/Quests.git
synced 2025-01-03 06:57:58 +01:00
Allow partial list of command display overrides, fixes #960
This commit is contained in:
parent
c34342df25
commit
6e5d130322
@ -653,12 +653,10 @@ public class Quest {
|
|||||||
int index = 0;
|
int index = 0;
|
||||||
for (String s : rews.getCommands()) {
|
for (String s : rews.getCommands()) {
|
||||||
if (rews.getCommandsOverrideDisplay().isEmpty() == false && rews.getCommandsOverrideDisplay().size()
|
if (rews.getCommandsOverrideDisplay().isEmpty() == false && rews.getCommandsOverrideDisplay().size()
|
||||||
>= index) {
|
> index) {
|
||||||
if (rews.getCommandsOverrideDisplay().size() > index) {
|
if (!rews.getCommandsOverrideDisplay().get(index).trim().equals("")) {
|
||||||
if (!rews.getCommandsOverrideDisplay().get(index).trim().equals("")) {
|
player.sendMessage("- " + ChatColor.DARK_GREEN
|
||||||
player.sendMessage("- " + ChatColor.DARK_GREEN
|
+ rews.getCommandsOverrideDisplay().get(index));
|
||||||
+ rews.getCommandsOverrideDisplay().get(index));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
player.sendMessage("- " + ChatColor.DARK_GREEN + s);
|
player.sendMessage("- " + ChatColor.DARK_GREEN + s);
|
||||||
|
@ -166,7 +166,13 @@ public class RewardsPrompt extends NumericPrompt {
|
|||||||
List<String> overrides = (List<String>) context.getSessionData(CK.REW_COMMAND_OVERRIDE_DISPLAY);
|
List<String> overrides = (List<String>) context.getSessionData(CK.REW_COMMAND_OVERRIDE_DISPLAY);
|
||||||
int index = 0;
|
int index = 0;
|
||||||
for (String cmd : commands) {
|
for (String cmd : commands) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + cmd + (overrides != null ? ChatColor.GRAY + " (\"" + ChatColor.AQUA + overrides.get(index) + ChatColor.GRAY + "\")" : "") + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + cmd;
|
||||||
|
if (overrides != null) {
|
||||||
|
if (index < overrides.size()) {
|
||||||
|
text += ChatColor.GRAY + " (\"" + ChatColor.AQUA + overrides.get(index) + ChatColor.GRAY + "\")";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
text += "\n";
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
|
Loading…
Reference in New Issue
Block a user