mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-22 10:36:09 +01:00
Prompt formatting cleanup, part 2
This commit is contained in:
parent
aa02e57735
commit
df9c40785d
@ -561,10 +561,12 @@ public class Quests extends JavaPlugin implements QuestsAPI {
|
||||
*
|
||||
* @param questNpcUuids a collection of UUIDs
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public void setQuestNpcUuids(final Collection<UUID> questNpcUuids) {
|
||||
this.questNpcUuids = new ConcurrentSkipListSet<>(questNpcUuids);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public CommandExecutor getCommandExecutor() {
|
||||
return cmdExecutor;
|
||||
}
|
||||
@ -657,16 +659,20 @@ public class Quests extends JavaPlugin implements QuestsAPI {
|
||||
super(context);
|
||||
}
|
||||
|
||||
private final int size = 2;
|
||||
@Override
|
||||
public ConversationContext getConversationContext() {
|
||||
return context;
|
||||
}
|
||||
|
||||
public int getSize() {
|
||||
return size;
|
||||
return 2;
|
||||
}
|
||||
|
||||
public String getTitle(final ConversationContext context) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public ChatColor getNumberColor(final ConversationContext context, final int number) {
|
||||
switch (number) {
|
||||
case 1:
|
||||
@ -678,6 +684,7 @@ public class Quests extends JavaPlugin implements QuestsAPI {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public String getSelectionText(final ConversationContext context, final int number) {
|
||||
switch (number) {
|
||||
case 1:
|
||||
|
@ -843,7 +843,7 @@ public class ActionMainPrompt extends ActionsEditorNumericPrompt {
|
||||
if (!type.isAlive()) {
|
||||
continue;
|
||||
}
|
||||
mobs.append(MiscUtil.snakeCaseToUpperCamelCase(mobArr[i].name()));
|
||||
mobs.append(ChatColor.AQUA).append(MiscUtil.snakeCaseToUpperCamelCase(mobArr[i].name()));
|
||||
if (i < (mobArr.length - 1)) {
|
||||
mobs.append(ChatColor.GRAY).append(", ");
|
||||
}
|
||||
|
@ -224,13 +224,13 @@ public class ConditionWorldPrompt extends ConditionsEditorNumericPrompt {
|
||||
final StringBuilder worlds = new StringBuilder(ChatColor.LIGHT_PURPLE + getTitle(context) + "\n");
|
||||
final List<World> worldArr = Bukkit.getWorlds();
|
||||
for (int i = 0; i < worldArr.size(); i++) {
|
||||
worlds.append(ChatColor.AQUA).append(worldArr.get(i).getName());
|
||||
if (i < (worldArr.size() - 1)) {
|
||||
worlds.append(worldArr.get(i).getName()).append(", ");
|
||||
} else {
|
||||
worlds.append(worldArr.get(i).getName()).append("\n");
|
||||
worlds.append(ChatColor.GRAY).append(", ");
|
||||
}
|
||||
}
|
||||
return worlds.toString() + ChatColor.YELLOW + getQueryText(context);
|
||||
worlds.append("\n").append(ChatColor.YELLOW).append(getQueryText(context));
|
||||
return worlds.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -497,13 +497,13 @@ public class ConditionWorldPrompt extends ConditionsEditorNumericPrompt {
|
||||
final StringBuilder biomes = new StringBuilder(ChatColor.LIGHT_PURPLE + getTitle(context) + "\n");
|
||||
final LinkedList<Biome> biomeArr = new LinkedList<>(Arrays.asList(Biome.values()));
|
||||
for (int i = 0; i < biomeArr.size(); i++) {
|
||||
biomes.append(ChatColor.AQUA).append(MiscUtil.snakeCaseToUpperCamelCase(biomeArr.get(i).name()));
|
||||
if (i < (biomeArr.size() - 1)) {
|
||||
biomes.append(MiscUtil.snakeCaseToUpperCamelCase(biomeArr.get(i).name())).append(", ");
|
||||
} else {
|
||||
biomes.append(MiscUtil.snakeCaseToUpperCamelCase(biomeArr.get(i).name())).append("\n");
|
||||
biomes.append(ChatColor.GRAY).append(", ");
|
||||
}
|
||||
biomes.append("\n").append(ChatColor.YELLOW).append(getQueryText(context));
|
||||
}
|
||||
return biomes.toString() + ChatColor.YELLOW + getQueryText(context);
|
||||
return biomes.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user