mirror of
https://github.com/PikaMug/Quests.git
synced 2025-02-16 12:31:19 +01:00
Remove excessive new lines in editor
This commit is contained in:
parent
e68a8858e8
commit
9926ee3746
@ -144,15 +144,16 @@ public class ActionMainPrompt extends ActionsEditorNumericPrompt {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final LinkedList<String> types = (LinkedList<String>) context.getSessionData(CK.E_MOB_TYPES);
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
if (types != null) {
|
||||
for (final String s : types) {
|
||||
final QuestMob qm = QuestMob.fromString(s);
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(qm.getType().name())
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA)
|
||||
.append(qm.getType().name())
|
||||
.append((qm.getName() != null) ? " (" + qm.getName() + ")" : "").append(ChatColor.GRAY)
|
||||
.append(" x ").append(ChatColor.DARK_AQUA).append(qm.getSpawnAmounts())
|
||||
.append(ChatColor.GRAY).append(" -> ").append(ChatColor.GREEN)
|
||||
.append(ConfigUtil.getLocationInfo(qm.getSpawnLocation())).append("\n");
|
||||
.append(ConfigUtil.getLocationInfo(qm.getSpawnLocation()));
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -348,15 +349,15 @@ public class ActionMainPrompt extends ActionsEditorNumericPrompt {
|
||||
@SuppressWarnings("unchecked")
|
||||
final
|
||||
LinkedList<String> types = (LinkedList<String>) context.getSessionData(CK.E_MOB_TYPES);
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
if (types != null) {
|
||||
for (final String type : types) {
|
||||
final QuestMob qm = QuestMob.fromString(type);
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(qm.getType()
|
||||
.name()).append((qm.getName() != null) ? " (" + qm.getName() + ")" : "")
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA)
|
||||
.append(qm.getType().name())
|
||||
.append((qm.getName() != null) ? " (" + qm.getName() + ")" : "")
|
||||
.append(" x ").append(qm.getSpawnAmounts()).append(ChatColor.GRAY).append(" -> ")
|
||||
.append(ChatColor.GREEN).append(ConfigUtil.getLocationInfo(qm.getSpawnLocation()))
|
||||
.append("\n");
|
||||
.append(ChatColor.GREEN).append(ConfigUtil.getLocationInfo(qm.getSpawnLocation()));
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
|
@ -29,7 +29,6 @@ import me.blackvein.quests.util.Lang;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.conversations.ConversationContext;
|
||||
import org.bukkit.conversations.Prompt;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Arrays;
|
||||
@ -288,11 +287,11 @@ public class ConditionMainPrompt extends ConditionsEditorNumericPrompt {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final List<String> id = (List<String>) context.getSessionData(CK.C_WHILE_PLACEHOLDER_ID);
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
if (id != null) {
|
||||
for (final String i : id) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(i)
|
||||
.append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).
|
||||
append(i);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -306,11 +305,11 @@ public class ConditionMainPrompt extends ConditionsEditorNumericPrompt {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final List<String> val = (List<String>) context.getSessionData(CK.C_WHILE_PLACEHOLDER_VAL);
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
if (val != null) {
|
||||
for (final String i : val) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(i)
|
||||
.append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA)
|
||||
.append(i);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
|
@ -93,12 +93,12 @@ public class EntityPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(CK.C_WHILE_RIDING_ENTITY) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<String> whileRidingEntity = (List<String>) context.getSessionData(CK.C_WHILE_RIDING_ENTITY);
|
||||
if (whileRidingEntity != null) {
|
||||
for (final String s: whileRidingEntity) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE)
|
||||
.append(MiscUtil.getProperMobType(s)).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE)
|
||||
.append(MiscUtil.getProperMobType(s));
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -108,12 +108,12 @@ public class EntityPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(CK.C_WHILE_RIDING_NPC) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<Integer> whileRidingNpc = (List<Integer>) context.getSessionData(CK.C_WHILE_RIDING_NPC);
|
||||
if (whileRidingNpc != null) {
|
||||
for (final int i : whileRidingNpc) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE)
|
||||
.append(CitizensAPI.getNPCRegistry().getById(i).getName()).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE)
|
||||
.append(CitizensAPI.getNPCRegistry().getById(i).getName());
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
|
@ -83,13 +83,13 @@ public class PlayerPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(CK.C_WHILE_PERMISSION) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<String> whilePermission = (List<String>) context.getSessionData(CK.C_WHILE_PERMISSION);
|
||||
if (whilePermission != null) {
|
||||
for (final String s: whilePermission) {
|
||||
// Replace standard period characters to prevent clickable links
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE)
|
||||
.append(s.replace(".", "\uFF0E")).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE)
|
||||
.append(s.replace(".", "\uFF0E"));
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -98,14 +98,14 @@ public class PlayerPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(CK.C_WHILE_HOLDING_MAIN_HAND) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final LinkedList<ItemStack> whileHoldingMainHand
|
||||
= (LinkedList<ItemStack>) context.getSessionData(CK.C_WHILE_HOLDING_MAIN_HAND);
|
||||
if (whileHoldingMainHand != null) {
|
||||
for (final ItemStack item : whileHoldingMainHand) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE)
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE)
|
||||
.append(ItemUtil.getName(item)).append(ChatColor.GRAY).append(" x ")
|
||||
.append(ChatColor.AQUA).append(item.getAmount()).append("\n");
|
||||
.append(ChatColor.AQUA).append(item.getAmount());
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
|
@ -98,11 +98,11 @@ public class WorldPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(CK.C_WHILE_WITHIN_WORLD) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<String> whileWithinWorld = (List<String>) context.getSessionData(CK.C_WHILE_WITHIN_WORLD);
|
||||
if (whileWithinWorld != null) {
|
||||
for (final String s: whileWithinWorld) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE).append(s).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE).append(s);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -111,11 +111,11 @@ public class WorldPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(CK.C_WHILE_WITHIN_BIOME) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<String> whileWithinBiome = (List<String>) context.getSessionData(CK.C_WHILE_WITHIN_BIOME);
|
||||
if (whileWithinBiome != null) {
|
||||
for (final String s: whileWithinBiome) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE).append(s).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE).append(s);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -125,12 +125,12 @@ public class WorldPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(CK.C_WHILE_WITHIN_REGION) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<String> whileWithinRegion
|
||||
= (List<String>) context.getSessionData(CK.C_WHILE_WITHIN_REGION);
|
||||
if (whileWithinRegion != null) {
|
||||
for (final String s: whileWithinRegion) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE).append(s).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE).append(s);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
|
@ -92,15 +92,15 @@ public class BlocksPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(pref + CK.S_BREAK_NAMES) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final LinkedList<String> names = (LinkedList<String>) context.getSessionData(pref + CK.S_BREAK_NAMES);
|
||||
final LinkedList<Integer> amounts
|
||||
= (LinkedList<Integer>) context.getSessionData(pref + CK.S_BREAK_AMOUNTS);
|
||||
if (names != null && amounts != null) {
|
||||
for (int i = 0; i < names.size(); i++) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE)
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE)
|
||||
.append(ItemUtil.getPrettyItemName(names.get(i))).append(ChatColor.GRAY).append(" x ")
|
||||
.append(ChatColor.DARK_AQUA).append(amounts.get(i)).append("\n");
|
||||
.append(ChatColor.DARK_AQUA).append(amounts.get(i));
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -109,15 +109,15 @@ public class BlocksPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(pref + CK.S_DAMAGE_NAMES) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final LinkedList<String> names = (LinkedList<String>) context.getSessionData(pref + CK.S_DAMAGE_NAMES);
|
||||
final LinkedList<Integer> amounts
|
||||
= (LinkedList<Integer>) context.getSessionData(pref + CK.S_DAMAGE_AMOUNTS);
|
||||
if (names != null && amounts != null) {
|
||||
for (int i = 0; i < names.size(); i++) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE)
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE)
|
||||
.append(ItemUtil.getPrettyItemName(names.get(i))).append(ChatColor.GRAY).append(" x ")
|
||||
.append(ChatColor.DARK_AQUA).append(amounts.get(i)).append("\n");
|
||||
.append(ChatColor.DARK_AQUA).append(amounts.get(i));
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -126,15 +126,15 @@ public class BlocksPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(pref + CK.S_PLACE_NAMES) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final LinkedList<String> names = (LinkedList<String>) context.getSessionData(pref + CK.S_PLACE_NAMES);
|
||||
final LinkedList<Integer> amounts
|
||||
= (LinkedList<Integer>) context.getSessionData(pref + CK.S_PLACE_AMOUNTS);
|
||||
if (names != null && amounts != null) {
|
||||
for (int i = 0; i < names.size(); i++) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE)
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE)
|
||||
.append(ItemUtil.getPrettyItemName(names.get(i))).append(ChatColor.GRAY).append(" x ")
|
||||
.append(ChatColor.DARK_AQUA).append(amounts.get(i)).append("\n");
|
||||
.append(ChatColor.DARK_AQUA).append(amounts.get(i));
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -143,15 +143,15 @@ public class BlocksPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(pref + CK.S_USE_NAMES) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final LinkedList<String> names = (LinkedList<String>) context.getSessionData(pref + CK.S_USE_NAMES);
|
||||
final LinkedList<Integer> amounts
|
||||
= (LinkedList<Integer>) context.getSessionData(pref + CK.S_USE_AMOUNTS);
|
||||
if (names != null && amounts != null) {
|
||||
for (int i = 0; i < names.size(); i++) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE)
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE)
|
||||
.append(ItemUtil.getPrettyItemName(names.get(i))).append(ChatColor.GRAY).append(" x ")
|
||||
.append(ChatColor.DARK_AQUA).append(amounts.get(i)).append("\n");
|
||||
.append(ChatColor.DARK_AQUA).append(amounts.get(i));
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -263,12 +263,12 @@ public class BlocksPrompt extends QuestsEditorNumericPrompt {
|
||||
switch(number) {
|
||||
case 1:
|
||||
if (context.getSessionData(pref + CK.S_BREAK_NAMES) != null) {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<String> breakNames = (List<String>) context.getSessionData(pref + CK.S_BREAK_NAMES);
|
||||
if (breakNames != null) {
|
||||
for (final String s : breakNames) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA)
|
||||
.append(ItemUtil.getPrettyItemName(s)).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA)
|
||||
.append(ItemUtil.getPrettyItemName(s));
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -277,12 +277,12 @@ public class BlocksPrompt extends QuestsEditorNumericPrompt {
|
||||
}
|
||||
case 2:
|
||||
if (context.getSessionData(pref + CK.S_BREAK_AMOUNTS) != null) {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<Integer> breakAmounts
|
||||
= (List<Integer>) context.getSessionData(pref + CK.S_BREAK_AMOUNTS);
|
||||
if (breakAmounts != null) {
|
||||
for (final Integer i : breakAmounts) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(i).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(i);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -291,12 +291,12 @@ public class BlocksPrompt extends QuestsEditorNumericPrompt {
|
||||
}
|
||||
case 3:
|
||||
if (context.getSessionData(pref + CK.S_BREAK_DURABILITY) != null) {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<Short> breakDurability
|
||||
= (List<Short>) context.getSessionData(pref + CK.S_BREAK_DURABILITY);
|
||||
if (breakDurability != null) {
|
||||
for (final Short s : breakDurability) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(s).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(s);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -634,12 +634,12 @@ public class BlocksPrompt extends QuestsEditorNumericPrompt {
|
||||
switch(number) {
|
||||
case 1:
|
||||
if (context.getSessionData(pref + CK.S_DAMAGE_NAMES) != null) {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<String> damageNames = (List<String>) context.getSessionData(pref + CK.S_DAMAGE_NAMES);
|
||||
if (damageNames != null) {
|
||||
for (final String s : damageNames) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA)
|
||||
.append(ItemUtil.getPrettyItemName(s)).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA)
|
||||
.append(ItemUtil.getPrettyItemName(s));
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -648,12 +648,12 @@ public class BlocksPrompt extends QuestsEditorNumericPrompt {
|
||||
}
|
||||
case 2:
|
||||
if (context.getSessionData(pref + CK.S_DAMAGE_AMOUNTS) != null) {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<Integer> damageAmounts
|
||||
= (List<Integer>) context.getSessionData(pref + CK.S_DAMAGE_AMOUNTS);
|
||||
if (damageAmounts != null) {
|
||||
for (final Integer i : damageAmounts) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(i).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(i);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -662,12 +662,12 @@ public class BlocksPrompt extends QuestsEditorNumericPrompt {
|
||||
}
|
||||
case 3:
|
||||
if (context.getSessionData(pref + CK.S_DAMAGE_DURABILITY) != null) {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<Short> damageDurability
|
||||
= (List<Short>) context.getSessionData(pref + CK.S_DAMAGE_DURABILITY);
|
||||
if (damageDurability != null) {
|
||||
for (final Short s : damageDurability) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(s).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(s);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -1002,12 +1002,12 @@ public class BlocksPrompt extends QuestsEditorNumericPrompt {
|
||||
switch(number) {
|
||||
case 1:
|
||||
if (context.getSessionData(pref + CK.S_PLACE_NAMES) != null) {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<String> placeNames = (List<String>) context.getSessionData(pref + CK.S_PLACE_NAMES);
|
||||
if (placeNames != null) {
|
||||
for (final String s : placeNames) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA)
|
||||
.append(ItemUtil.getPrettyItemName(s)).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA)
|
||||
.append(ItemUtil.getPrettyItemName(s));
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -1016,12 +1016,12 @@ public class BlocksPrompt extends QuestsEditorNumericPrompt {
|
||||
}
|
||||
case 2:
|
||||
if (context.getSessionData(pref + CK.S_PLACE_AMOUNTS) != null) {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<Integer> placeAmounts
|
||||
= (List<Integer>) context.getSessionData(pref + CK.S_PLACE_AMOUNTS);
|
||||
if (placeAmounts != null) {
|
||||
for (final Integer i : placeAmounts) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(i).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(i);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -1030,12 +1030,12 @@ public class BlocksPrompt extends QuestsEditorNumericPrompt {
|
||||
}
|
||||
case 3:
|
||||
if (context.getSessionData(pref + CK.S_PLACE_DURABILITY) != null) {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<Short> placeDurability
|
||||
= (List<Short>) context.getSessionData(pref + CK.S_PLACE_DURABILITY);
|
||||
if (placeDurability != null) {
|
||||
for (final Short s : placeDurability) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(s).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(s);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -1370,12 +1370,12 @@ public class BlocksPrompt extends QuestsEditorNumericPrompt {
|
||||
switch(number) {
|
||||
case 1:
|
||||
if (context.getSessionData(pref + CK.S_USE_NAMES) != null) {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<String> useNames = (List<String>) context.getSessionData(pref + CK.S_USE_NAMES);
|
||||
if (useNames != null) {
|
||||
for (final String s : useNames) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA)
|
||||
.append(ItemUtil.getPrettyItemName(s)).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA)
|
||||
.append(ItemUtil.getPrettyItemName(s));
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -1384,11 +1384,11 @@ public class BlocksPrompt extends QuestsEditorNumericPrompt {
|
||||
}
|
||||
case 2:
|
||||
if (context.getSessionData(pref + CK.S_USE_AMOUNTS) != null) {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<Integer> useAmounts = (List<Integer>) context.getSessionData(pref + CK.S_USE_AMOUNTS);
|
||||
if (useAmounts != null) {
|
||||
for (final Integer i : useAmounts) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(i).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(i);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -1397,11 +1397,11 @@ public class BlocksPrompt extends QuestsEditorNumericPrompt {
|
||||
}
|
||||
case 3:
|
||||
if (context.getSessionData(pref + CK.S_USE_DURABILITY) != null) {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<Short> useDurability = (List<Short>) context.getSessionData(pref + CK.S_USE_DURABILITY);
|
||||
if (useDurability != null) {
|
||||
for (final Short s : useDurability) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(s).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(s);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
|
@ -94,14 +94,14 @@ public class ItemsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(pref + CK.S_CRAFT_ITEMS) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final LinkedList<ItemStack> items
|
||||
= (LinkedList<ItemStack>) context.getSessionData(pref + CK.S_CRAFT_ITEMS);
|
||||
if (items != null) {
|
||||
for (final ItemStack item : items) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE)
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE)
|
||||
.append(ItemUtil.getName(item)).append(ChatColor.GRAY).append(" x ")
|
||||
.append(ChatColor.AQUA).append(item.getAmount()).append("\n");
|
||||
.append(ChatColor.AQUA).append(item.getAmount());
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -110,14 +110,14 @@ public class ItemsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(pref + CK.S_SMELT_ITEMS) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final LinkedList<ItemStack> items
|
||||
= (LinkedList<ItemStack>) context.getSessionData(pref + CK.S_SMELT_ITEMS);
|
||||
if (items != null) {
|
||||
for (final ItemStack item : items) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE)
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE)
|
||||
.append(ItemUtil.getName(item)).append(ChatColor.GRAY).append(" x ")
|
||||
.append(ChatColor.AQUA).append(item.getAmount()).append("\n");
|
||||
.append(ChatColor.AQUA).append(item.getAmount());
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -126,13 +126,13 @@ public class ItemsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(pref + CK.S_ENCHANT_ITEMS) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final LinkedList<ItemStack> items = (LinkedList<ItemStack>) context.getSessionData(pref + CK.S_ENCHANT_ITEMS);
|
||||
if (items != null) {
|
||||
for (final ItemStack item : items) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE)
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE)
|
||||
.append(ItemUtil.getName(item)).append(ChatColor.GRAY).append(" x ")
|
||||
.append(ChatColor.AQUA).append(item.getAmount()).append("\n");
|
||||
.append(ChatColor.AQUA).append(item.getAmount());
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -141,13 +141,13 @@ public class ItemsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(pref + CK.S_BREW_ITEMS) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final LinkedList<ItemStack> items = (LinkedList<ItemStack>) context.getSessionData(pref + CK.S_BREW_ITEMS);
|
||||
if (items != null) {
|
||||
for (final ItemStack item : items) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE)
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE)
|
||||
.append(ItemUtil.getName(item)).append(ChatColor.GRAY).append(" x ")
|
||||
.append(ChatColor.AQUA).append(item.getAmount()).append("\n");
|
||||
.append(ChatColor.AQUA).append(item.getAmount());
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -156,14 +156,14 @@ public class ItemsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(pref + CK.S_CONSUME_ITEMS) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final LinkedList<ItemStack> items
|
||||
= (LinkedList<ItemStack>) context.getSessionData(pref + CK.S_CONSUME_ITEMS);
|
||||
if (items != null) {
|
||||
for (final ItemStack item : items) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE)
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE)
|
||||
.append(ItemUtil.getName(item)).append(ChatColor.GRAY).append(" x ")
|
||||
.append(ChatColor.AQUA).append(item.getAmount()).append("\n");
|
||||
.append(ChatColor.AQUA).append(item.getAmount());
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -290,13 +290,13 @@ public class ItemsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(pref + CK.S_CRAFT_ITEMS) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<ItemStack> craftItems
|
||||
= (List<ItemStack>) context.getSessionData(pref + CK.S_CRAFT_ITEMS);
|
||||
if (craftItems != null) {
|
||||
for (final ItemStack is : craftItems) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ItemUtil.getDisplayString(is))
|
||||
.append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ")
|
||||
.append(ItemUtil.getDisplayString(is));
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -412,13 +412,13 @@ public class ItemsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(pref + CK.S_SMELT_ITEMS) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<ItemStack> smeltItems
|
||||
= (List<ItemStack>) context.getSessionData(pref + CK.S_SMELT_ITEMS);
|
||||
if (smeltItems != null) {
|
||||
for (final ItemStack is : smeltItems) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ItemUtil.getDisplayString(is))
|
||||
.append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ")
|
||||
.append(ItemUtil.getDisplayString(is));
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -534,13 +534,13 @@ public class ItemsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(pref + CK.S_ENCHANT_ITEMS) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<ItemStack> enchantItems
|
||||
= (List<ItemStack>) context.getSessionData(pref + CK.S_ENCHANT_ITEMS);
|
||||
if (enchantItems != null) {
|
||||
for (final ItemStack is : enchantItems) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ItemUtil.getDisplayString(is))
|
||||
.append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ")
|
||||
.append(ItemUtil.getDisplayString(is));
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -656,11 +656,12 @@ public class ItemsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(pref + CK.S_BREW_ITEMS) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<ItemStack> brewItems = (List<ItemStack>) context.getSessionData(pref + CK.S_BREW_ITEMS);
|
||||
if (brewItems != null) {
|
||||
for (final ItemStack is : brewItems) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ItemUtil.getDisplayString(is)).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ")
|
||||
.append(ItemUtil.getDisplayString(is));
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -774,13 +775,13 @@ public class ItemsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(pref + CK.S_CONSUME_ITEMS) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<ItemStack> consumeItems
|
||||
= (List<ItemStack>) context.getSessionData(pref + CK.S_CONSUME_ITEMS);
|
||||
if (consumeItems != null) {
|
||||
for (final ItemStack is : consumeItems) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ItemUtil.getDisplayString(is))
|
||||
.append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ")
|
||||
.append(ItemUtil.getDisplayString(is));
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
|
@ -97,18 +97,18 @@ public class NpcsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(pref + CK.S_DELIVERY_ITEMS) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final LinkedList<Integer> npcs = (LinkedList<Integer>) context.getSessionData(pref + CK.S_DELIVERY_NPCS);
|
||||
final LinkedList<ItemStack> items
|
||||
= (LinkedList<ItemStack>) context.getSessionData(pref + CK.S_DELIVERY_ITEMS);
|
||||
if (npcs != null && items != null) {
|
||||
for (int i = 0; i < npcs.size(); i++) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE)
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE)
|
||||
.append(ItemUtil.getName(items.get(i))).append(ChatColor.GRAY).append(" x ")
|
||||
.append(ChatColor.AQUA).append(items.get(i).getAmount()).append(ChatColor.GRAY)
|
||||
.append(" ").append(Lang.get("to")).append(" ").append(ChatColor.DARK_AQUA)
|
||||
.append(plugin.getDependencies().getCitizens().getNPCRegistry()
|
||||
.getById(npcs.get(i)).getName()).append("\n");
|
||||
.getById(npcs.get(i)).getName());
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -121,7 +121,7 @@ public class NpcsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(pref + CK.S_NPCS_TO_TALK_TO) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final LinkedList<Integer> npcs
|
||||
= (LinkedList<Integer>) context.getSessionData(pref + CK.S_NPCS_TO_TALK_TO);
|
||||
if (npcs != null) {
|
||||
@ -141,16 +141,16 @@ public class NpcsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(pref + CK.S_NPCS_TO_KILL) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final LinkedList<Integer> npcs = (LinkedList<Integer>) context.getSessionData(pref + CK.S_NPCS_TO_KILL);
|
||||
final LinkedList<Integer> amounts
|
||||
= (LinkedList<Integer>) context.getSessionData(pref + CK.S_NPCS_TO_KILL_AMOUNTS);
|
||||
if (npcs != null && amounts != null) {
|
||||
for (int i = 0; i < npcs.size(); i++) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE)
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE)
|
||||
.append(plugin.getDependencies().getCitizens().getNPCRegistry()
|
||||
.getById(npcs.get(i)).getName()).append(ChatColor.GRAY).append(" x ")
|
||||
.append(ChatColor.AQUA).append(amounts.get(i)).append("\n");
|
||||
.append(ChatColor.AQUA).append(amounts.get(i));
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -280,13 +280,13 @@ public class NpcsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(pref + CK.S_DELIVERY_ITEMS) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<ItemStack> deliveryItems
|
||||
= (List<ItemStack>) context.getSessionData(pref + CK.S_DELIVERY_ITEMS);
|
||||
if (deliveryItems != null) {
|
||||
for (final ItemStack is : deliveryItems) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ItemUtil.getDisplayString(is))
|
||||
.append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ")
|
||||
.append(ItemUtil.getDisplayString(is));
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -295,13 +295,14 @@ public class NpcsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(pref + CK.S_DELIVERY_NPCS) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final List<Integer> deliveryNpcs = (List<Integer>) context.getSessionData(pref + CK.S_DELIVERY_NPCS);
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<Integer> deliveryNpcs
|
||||
= (List<Integer>) context.getSessionData(pref + CK.S_DELIVERY_NPCS);
|
||||
if (deliveryNpcs != null) {
|
||||
for (final int i : deliveryNpcs) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(i).append(" (")
|
||||
.append(plugin.getDependencies().getCitizens().getNPCRegistry().getById(i).getName())
|
||||
.append(")\n");
|
||||
text.append(")\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(i)
|
||||
.append(" (").append(plugin.getDependencies().getCitizens().getNPCRegistry()
|
||||
.getById(i).getName());
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -310,13 +311,13 @@ public class NpcsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(pref + CK.S_DELIVERY_MESSAGES) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<String> deliveryMessages
|
||||
= (List<String>) context.getSessionData(pref + CK.S_DELIVERY_MESSAGES);
|
||||
if (deliveryMessages != null) {
|
||||
for (final String s : deliveryMessages) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append("\"").append(s)
|
||||
.append("\"\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA)
|
||||
.append("\"").append(s).append("\"");
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -623,14 +624,14 @@ public class NpcsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(pref + CK.S_NPCS_TO_KILL) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<Integer> npcsToKill = (List<Integer>) context.getSessionData(pref + CK.S_NPCS_TO_KILL);
|
||||
if (npcsToKill != null) {
|
||||
for (final Integer i : npcsToKill) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA)
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA)
|
||||
.append(plugin.getDependencies().getCitizens().getNPCRegistry()
|
||||
.getById(i).getName()).append(ChatColor.DARK_AQUA).append(" (").append(i)
|
||||
.append(")\n");
|
||||
.append(")");
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -642,12 +643,12 @@ public class NpcsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(pref + CK.S_NPCS_TO_KILL_AMOUNTS) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<Integer> npcsToKillAmounts
|
||||
= (List<Integer>) context.getSessionData(pref + CK.S_NPCS_TO_KILL_AMOUNTS);
|
||||
if (npcsToKillAmounts != null) {
|
||||
for (final Integer i : npcsToKillAmounts) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE).append(i).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE).append(i);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
|
@ -187,13 +187,13 @@ public class RequirementsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(CK.REQ_ITEMS) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final LinkedList<ItemStack> items = (LinkedList<ItemStack>) context.getSessionData(CK.REQ_ITEMS);
|
||||
if (items != null) {
|
||||
for (final ItemStack item : items) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE)
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE)
|
||||
.append(ItemUtil.getName(item)).append(ChatColor.GRAY).append(" x ")
|
||||
.append(ChatColor.AQUA).append(item.getAmount()).append("\n");
|
||||
.append(ChatColor.AQUA).append(item.getAmount());
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -202,11 +202,11 @@ public class RequirementsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(CK.REQ_PERMISSION) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<String> perms = (List<String>) context.getSessionData(CK.REQ_PERMISSION);
|
||||
if (perms != null) {
|
||||
for (final String s : perms) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(s).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(s);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -215,14 +215,14 @@ public class RequirementsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(CK.REQ_QUEST) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<String> questReq = (List<String>) context.getSessionData(CK.REQ_QUEST);
|
||||
if (questReq != null) {
|
||||
for (String s : questReq) {
|
||||
if (plugin.getQuestById(s) != null) {
|
||||
s = plugin.getQuestById(s).getName();
|
||||
}
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(s).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(s);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -231,14 +231,14 @@ public class RequirementsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(CK.REQ_QUEST_BLOCK) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<String> questBlockReq = (List<String>) context.getSessionData(CK.REQ_QUEST_BLOCK);
|
||||
if (questBlockReq != null) {
|
||||
for (String s : questBlockReq) {
|
||||
if (plugin.getQuestById(s) != null) {
|
||||
s = plugin.getQuestById(s).getName();
|
||||
}
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(s).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(s);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -248,15 +248,15 @@ public class RequirementsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(CK.REQ_MCMMO_SKILLS) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<String> skills = (List<String>) context.getSessionData(CK.REQ_MCMMO_SKILLS);
|
||||
final List<Integer> amounts = (List<Integer>) context.getSessionData(CK.REQ_MCMMO_SKILL_AMOUNTS);
|
||||
if (skills != null && amounts != null) {
|
||||
for (final String s : skills) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.DARK_GREEN).append(s)
|
||||
.append(ChatColor.RESET).append(ChatColor.YELLOW).append(" ")
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.DARK_GREEN)
|
||||
.append(s).append(ChatColor.RESET).append(ChatColor.YELLOW).append(" ")
|
||||
.append(Lang.get("mcMMOLevel")).append(" ").append(ChatColor.GREEN)
|
||||
.append(amounts.get(skills.indexOf(s))).append("\n");
|
||||
.append(amounts.get(skills.indexOf(s)));
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -288,12 +288,11 @@ public class RequirementsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(CK.REQ_CUSTOM) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final LinkedList<String> customReq = (LinkedList<String>) context.getSessionData(CK.REQ_CUSTOM);
|
||||
if (customReq != null) {
|
||||
for (final String s : customReq) {
|
||||
text.append(ChatColor.RESET).append(ChatColor.DARK_PURPLE).append(" - ")
|
||||
.append(ChatColor.LIGHT_PURPLE).append(s).append("\n");
|
||||
text.append("\n").append(ChatColor.LIGHT_PURPLE).append(" - ").append(s);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -306,11 +305,12 @@ public class RequirementsPrompt extends QuestsEditorNumericPrompt {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
}
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<String> overrides = (List<String>) context.getSessionData(CK.REQ_FAIL_MESSAGE);
|
||||
if (overrides != null) {
|
||||
for (final String override : overrides) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(override).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA)
|
||||
.append(override);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -608,12 +608,12 @@ public class RequirementsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(CK.REQ_ITEMS) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<ItemStack> reqItems = (List<ItemStack>) context.getSessionData(CK.REQ_ITEMS);
|
||||
if (reqItems != null) {
|
||||
for (final ItemStack is : reqItems) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ItemUtil.getDisplayString(is))
|
||||
.append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ")
|
||||
.append(ItemUtil.getDisplayString(is));
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -625,13 +625,12 @@ public class RequirementsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(CK.REQ_ITEMS_REMOVE) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<Boolean> reqItemsRemove = (List<Boolean>) context.getSessionData(CK.REQ_ITEMS_REMOVE);
|
||||
if (reqItemsRemove != null) {
|
||||
for (final Boolean b : reqItemsRemove) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA)
|
||||
.append(b.equals(Boolean.TRUE) ? Lang.get("yesWord") : Lang.get("noWord"))
|
||||
.append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA)
|
||||
.append(b.equals(Boolean.TRUE) ? Lang.get("yesWord") : Lang.get("noWord"));
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -956,12 +955,12 @@ public class RequirementsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(CK.REQ_MCMMO_SKILLS) == null) {
|
||||
return ChatColor.GRAY + " (" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final LinkedList<String> skills = (LinkedList<String>) context.getSessionData(CK.REQ_MCMMO_SKILLS);
|
||||
if (skills != null) {
|
||||
for (final String skill : skills) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(skill)
|
||||
.append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA)
|
||||
.append(skill);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -970,12 +969,12 @@ public class RequirementsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(CK.REQ_MCMMO_SKILL_AMOUNTS) == null) {
|
||||
return ChatColor.GRAY + " (" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final LinkedList<Integer> skillAmounts
|
||||
= (LinkedList<Integer>) context.getSessionData(CK.REQ_MCMMO_SKILL_AMOUNTS);
|
||||
if (skillAmounts != null) {
|
||||
for (final int i : skillAmounts) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(i).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(i);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
|
@ -212,7 +212,7 @@ public class RewardsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(CK.REW_ITEMS) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final LinkedList<ItemStack> items = (LinkedList<ItemStack>) context.getSessionData(CK.REW_ITEMS);
|
||||
if (items != null) {
|
||||
for (final ItemStack item : items) {
|
||||
@ -221,7 +221,9 @@ public class RewardsPrompt extends QuestsEditorNumericPrompt {
|
||||
plugin.getLogger().severe(ChatColor.RED + "Item reward was null while editing quest ID "
|
||||
+ context.getSessionData(CK.Q_ID));
|
||||
} else {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE).append(ItemUtil.getName(item)).append(ChatColor.GRAY).append(" x ").append(ChatColor.AQUA).append(item.getAmount()).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.BLUE)
|
||||
.append(ItemUtil.getName(item)).append(ChatColor.GRAY).append(" x ")
|
||||
.append(ChatColor.AQUA).append(item.getAmount());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -238,20 +240,19 @@ public class RewardsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(CK.REW_COMMAND) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<String> commands = (List<String>) context.getSessionData(CK.REW_COMMAND);
|
||||
final List<String> overrides = (List<String>) context.getSessionData(CK.REW_COMMAND_OVERRIDE_DISPLAY);
|
||||
int index = 0;
|
||||
if (commands != null) {
|
||||
for (final String cmd : commands) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(cmd);
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(cmd);
|
||||
if (overrides != null) {
|
||||
if (index < overrides.size()) {
|
||||
text.append(ChatColor.GRAY).append(" (\"").append(ChatColor.AQUA)
|
||||
.append(overrides.get(index)).append(ChatColor.GRAY).append("\")");
|
||||
}
|
||||
}
|
||||
text.append("\n");
|
||||
index++;
|
||||
}
|
||||
}
|
||||
@ -261,20 +262,19 @@ public class RewardsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(CK.REW_PERMISSION) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<String> permissions = (List<String>) context.getSessionData(CK.REW_PERMISSION);
|
||||
final List<String> worlds = (List<String>) context.getSessionData(CK.REW_PERMISSION_WORLDS);
|
||||
int index = 0;
|
||||
if (permissions != null) {
|
||||
for (final String perm : permissions) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(perm);
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(perm);
|
||||
if (worlds != null) {
|
||||
if (index < worlds.size()) {
|
||||
text.append(ChatColor.GRAY).append("[").append(ChatColor.DARK_AQUA)
|
||||
.append(worlds.get(index)).append(ChatColor.GRAY).append("]");
|
||||
}
|
||||
}
|
||||
text.append("\n");
|
||||
index++;
|
||||
}
|
||||
}
|
||||
@ -285,14 +285,14 @@ public class RewardsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(CK.REW_MCMMO_SKILLS) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<String> skills = (List<String>) context.getSessionData(CK.REW_MCMMO_SKILLS);
|
||||
final List<Integer> amounts = (List<Integer>) context.getSessionData(CK.REW_MCMMO_AMOUNTS);
|
||||
if (skills != null && amounts != null) {
|
||||
for (final String skill : skills) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(skill)
|
||||
.append(ChatColor.GRAY).append(" x ").append(ChatColor.DARK_AQUA)
|
||||
.append(amounts.get(skills.indexOf(skill))).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA)
|
||||
.append(skill).append(ChatColor.GRAY).append(" x ").append(ChatColor.DARK_AQUA)
|
||||
.append(amounts.get(skills.indexOf(skill)));
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -305,15 +305,15 @@ public class RewardsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(CK.REW_HEROES_CLASSES) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<String> heroClasses = (List<String>) context.getSessionData(CK.REW_HEROES_CLASSES);
|
||||
final List<Double> amounts = (List<Double>) context.getSessionData(CK.REW_HEROES_AMOUNTS);
|
||||
if (heroClasses != null && amounts != null) {
|
||||
for (final String heroClass : heroClasses) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA)
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA)
|
||||
.append(amounts.get(heroClasses.indexOf(heroClass))).append(" ")
|
||||
.append(ChatColor.DARK_AQUA).append(heroClass).append(" ")
|
||||
.append(Lang.get("experience")).append("\n");
|
||||
.append(Lang.get("experience"));
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -333,12 +333,12 @@ public class RewardsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(CK.REW_PHAT_LOOTS) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<String> phatLoots = (List<String>) context.getSessionData(CK.REW_PHAT_LOOTS);
|
||||
if (phatLoots != null) {
|
||||
for (final String phatLoot : phatLoots) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(phatLoot)
|
||||
.append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA)
|
||||
.append(phatLoot);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -350,12 +350,11 @@ public class RewardsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(CK.REW_CUSTOM) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final LinkedList<String> customRew = (LinkedList<String>) context.getSessionData(CK.REW_CUSTOM);
|
||||
if (customRew != null) {
|
||||
for (final String s : customRew) {
|
||||
text.append(ChatColor.RESET).append(ChatColor.DARK_PURPLE).append(" - ")
|
||||
.append(ChatColor.LIGHT_PURPLE).append(s).append("\n");
|
||||
text.append("\n").append(ChatColor.LIGHT_PURPLE).append(" - ").append(s);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -368,12 +367,12 @@ public class RewardsPrompt extends QuestsEditorNumericPrompt {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
}
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<String> overrides = (List<String>) context.getSessionData(CK.REW_DETAILS_OVERRIDE);
|
||||
if (overrides != null) {
|
||||
for (final String override : overrides) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(override)
|
||||
.append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA)
|
||||
.append(override);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -728,11 +727,12 @@ public class RewardsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(CK.REW_ITEMS) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<ItemStack> items = (List<ItemStack>) context.getSessionData(CK.REW_ITEMS);
|
||||
if (items != null) {
|
||||
for (final ItemStack is : items) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ItemUtil.getDisplayString(is)).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ")
|
||||
.append(ItemUtil.getDisplayString(is));
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -931,11 +931,11 @@ public class RewardsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(CK.REW_PERMISSION) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<String> permission = (List<String>) context.getSessionData(CK.REW_PERMISSION);
|
||||
if (permission != null) {
|
||||
for (final String s : permission) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(s).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(s);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -947,13 +947,13 @@ public class RewardsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(CK.REW_PERMISSION_WORLDS) == null) {
|
||||
return ChatColor.YELLOW + "(" + Lang.get("stageEditorOptional") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<String> permissionWorlds
|
||||
= (List<String>) context.getSessionData(CK.REW_PERMISSION_WORLDS);
|
||||
if (permissionWorlds != null) {
|
||||
for (final String s : permissionWorlds) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(s)
|
||||
.append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA)
|
||||
.append(s);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -1185,11 +1185,11 @@ public class RewardsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(CK.REW_MCMMO_SKILLS) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<String> skills = (List<String>) context.getSessionData(CK.REW_MCMMO_SKILLS);
|
||||
if (skills != null) {
|
||||
for (final String s : skills) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(s).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(s);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -1198,11 +1198,11 @@ public class RewardsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(CK.REW_MCMMO_AMOUNTS) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<Integer> amounts = (List<Integer>) context.getSessionData(CK.REW_MCMMO_AMOUNTS);
|
||||
if (amounts != null) {
|
||||
for (final Integer i : amounts) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(i).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(i);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -1446,11 +1446,11 @@ public class RewardsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(CK.REW_HEROES_CLASSES) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<String> classes = (List<String>) context.getSessionData(CK.REW_HEROES_CLASSES);
|
||||
if (classes != null) {
|
||||
for (final String s : classes) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(s).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(s);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -1459,11 +1459,11 @@ public class RewardsPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(CK.REW_HEROES_AMOUNTS) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<Double> amounts = (List<Double>) context.getSessionData(CK.REW_HEROES_AMOUNTS);
|
||||
if (amounts != null) {
|
||||
for (final Double d : amounts) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(d).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(d);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
|
@ -281,7 +281,7 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(stagePrefix + CK.S_REACH_LOCATIONS) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final LinkedList<String> locations
|
||||
= (LinkedList<String>) context.getSessionData(stagePrefix + CK.S_REACH_LOCATIONS);
|
||||
final LinkedList<Integer> radii
|
||||
@ -290,12 +290,12 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
|
||||
= (LinkedList<String>) context.getSessionData(stagePrefix + CK.S_REACH_LOCATIONS_NAMES);
|
||||
if (locations != null && radii != null && names != null) {
|
||||
for (int i = 0; i < locations.size(); i++) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(Lang.get("stageEditorReachRadii1"))
|
||||
.append(" ").append(ChatColor.BLUE).append(radii.get(i)).append(ChatColor.GRAY)
|
||||
.append(" ").append(Lang.get("stageEditorReachRadii2")).append(" ")
|
||||
.append(ChatColor.AQUA).append(names.get(i)).append(ChatColor.GRAY).append(" (")
|
||||
.append(ChatColor.DARK_AQUA).append(locations.get(i)).append(ChatColor.GRAY)
|
||||
.append(")\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ")
|
||||
.append(Lang.get("stageEditorReachRadii1")).append(" ").append(ChatColor.BLUE)
|
||||
.append(radii.get(i)).append(ChatColor.GRAY).append(" ")
|
||||
.append(Lang.get("stageEditorReachRadii2")).append(" ").append(ChatColor.AQUA)
|
||||
.append(names.get(i)).append(ChatColor.GRAY).append(" (").append(ChatColor.DARK_AQUA)
|
||||
.append(locations.get(i)).append(ChatColor.GRAY).append(")");
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -304,15 +304,16 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(stagePrefix + CK.S_PASSWORD_PHRASES) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final LinkedList<String> passPhrases
|
||||
= (LinkedList<String>) context.getSessionData(stagePrefix + CK.S_PASSWORD_PHRASES);
|
||||
final LinkedList<String> passDisplays
|
||||
= (LinkedList<String>) context.getSessionData(stagePrefix + CK.S_PASSWORD_DISPLAYS);
|
||||
if (passPhrases != null && passDisplays != null) {
|
||||
for (int i = 0; i < passDisplays.size(); i++) {
|
||||
text.append(ChatColor.AQUA).append(" - \"").append(passDisplays.get(i)).append("\"\n");
|
||||
text.append(ChatColor.DARK_AQUA).append(" - ").append(passPhrases.get(i)).append("\n");
|
||||
text.append("\n").append(ChatColor.AQUA).append(" - \"").append(passDisplays.get(i))
|
||||
.append("\"\n").append(ChatColor.DARK_AQUA).append(" - ")
|
||||
.append(passPhrases.get(i));
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -321,13 +322,12 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(stagePrefix + CK.S_CUSTOM_OBJECTIVES) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final LinkedList<String> customObj
|
||||
= (LinkedList<String>) context.getSessionData(stagePrefix + CK.S_CUSTOM_OBJECTIVES);
|
||||
if (customObj != null) {
|
||||
for (final String s : customObj) {
|
||||
text.append(ChatColor.LIGHT_PURPLE).append(" - ").append(ChatColor.GOLD).append(s)
|
||||
.append("\n");
|
||||
text.append("\n").append(ChatColor.LIGHT_PURPLE).append(" - ").append(s);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -409,14 +409,14 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
}
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
if (stagePrefix != null) {
|
||||
final List<String> overrides
|
||||
= (List<String>) context.getSessionData(stagePrefix + CK.S_OVERRIDE_DISPLAY);
|
||||
if (overrides != null) {
|
||||
for (final String override : overrides) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(override)
|
||||
.append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA)
|
||||
.append(override);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -684,13 +684,13 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(stagePrefix + CK.S_REACH_LOCATIONS) == null) {
|
||||
return ChatColor.GRAY + " (" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<String> locations
|
||||
= (List<String>) context.getSessionData(stagePrefix + CK.S_REACH_LOCATIONS);
|
||||
if (locations != null) {
|
||||
for (final String s : locations) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.DARK_AQUA).append(s)
|
||||
.append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.DARK_AQUA)
|
||||
.append(s);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -699,12 +699,12 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(stagePrefix + CK.S_REACH_LOCATIONS_RADIUS) == null) {
|
||||
return ChatColor.GRAY + " (" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<Integer> radius
|
||||
= (List<Integer>) context.getSessionData(stagePrefix + CK.S_REACH_LOCATIONS_RADIUS);
|
||||
if (radius != null) {
|
||||
for (final Integer i : radius) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(i).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(i);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -713,12 +713,12 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(stagePrefix + CK.S_REACH_LOCATIONS_NAMES) == null) {
|
||||
return ChatColor.GRAY + " (" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<String> names
|
||||
= (List<String>) context.getSessionData(stagePrefix + CK.S_REACH_LOCATIONS_NAMES);
|
||||
if (names != null) {
|
||||
for (final String s : names) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(s).append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(s);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -907,7 +907,7 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
|
||||
= new QuestsEditorPostOpenStringPromptEvent(context, this);
|
||||
context.getPlugin().getServer().getPluginManager().callEvent(event);
|
||||
}
|
||||
|
||||
|
||||
return ChatColor.YELLOW + getQueryText(context);
|
||||
}
|
||||
|
||||
@ -1030,13 +1030,13 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(stagePrefix + CK.S_PASSWORD_DISPLAYS) == null) {
|
||||
return ChatColor.GRAY + " (" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<String> displays = (List<String>) context.getSessionData(stagePrefix
|
||||
+ CK.S_PASSWORD_DISPLAYS);
|
||||
if (displays != null) {
|
||||
for (final String display : displays) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA).append(display)
|
||||
.append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.AQUA)
|
||||
.append(display);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -1045,13 +1045,13 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(stagePrefix + CK.S_PASSWORD_PHRASES) == null) {
|
||||
return ChatColor.GRAY + " (" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final List<String> phrases = (List<String>) context.getSessionData(stagePrefix
|
||||
+ CK.S_PASSWORD_PHRASES);
|
||||
if (phrases != null) {
|
||||
for (final String phrase : phrases) {
|
||||
text.append(ChatColor.GRAY).append(" - ").append(ChatColor.DARK_AQUA).append(phrase)
|
||||
.append("\n");
|
||||
text.append("\n").append(ChatColor.GRAY).append(" - ").append(ChatColor.DARK_AQUA)
|
||||
.append(phrase);
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -1325,16 +1325,17 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(stagePrefix + CK.S_CHAT_EVENTS) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final LinkedList<String> chatEvents = (LinkedList<String>) context.getSessionData(stagePrefix
|
||||
+ CK.S_CHAT_EVENTS);
|
||||
final LinkedList<String> chatEventTriggers
|
||||
= (LinkedList<String>) context.getSessionData(stagePrefix + CK.S_CHAT_EVENT_TRIGGERS);
|
||||
if (chatEvents != null && chatEventTriggers != null) {
|
||||
for (final String event : chatEvents) {
|
||||
text.append(ChatColor.AQUA).append(" - ").append(event).append(ChatColor.BLUE)
|
||||
.append(" (").append(Lang.get("stageEditorTriggeredBy")).append(": \"")
|
||||
.append(chatEventTriggers.get(chatEvents.indexOf(event))).append("\")\n");
|
||||
text.append("\n").append(ChatColor.AQUA).append(" - ").append(event)
|
||||
.append(ChatColor.BLUE).append(" (").append(Lang.get("stageEditorTriggeredBy"))
|
||||
.append(": \"").append(chatEventTriggers.get(chatEvents.indexOf(event)))
|
||||
.append("\")");
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -1343,16 +1344,17 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
|
||||
if (context.getSessionData(stagePrefix + CK.S_COMMAND_EVENTS) == null) {
|
||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||
} else {
|
||||
final StringBuilder text = new StringBuilder("\n");
|
||||
final StringBuilder text = new StringBuilder();
|
||||
final LinkedList<String> commandEvents
|
||||
= (LinkedList<String>) context.getSessionData(stagePrefix + CK.S_COMMAND_EVENTS);
|
||||
final LinkedList<String> commandEventTriggers
|
||||
= (LinkedList<String>) context.getSessionData(stagePrefix + CK.S_COMMAND_EVENT_TRIGGERS);
|
||||
if (commandEvents != null && commandEventTriggers != null) {
|
||||
for (final String event : commandEvents) {
|
||||
text.append(ChatColor.AQUA).append(" - ").append(event).append(ChatColor.BLUE)
|
||||
.append(" (").append(Lang.get("stageEditorTriggeredBy")).append(": \"")
|
||||
.append(commandEventTriggers.get(commandEvents.indexOf(event))).append("\")\n");
|
||||
text.append("\n").append(ChatColor.AQUA).append(" - ").append(event)
|
||||
.append(ChatColor.BLUE).append(" (").append(Lang.get("stageEditorTriggeredBy"))
|
||||
.append(": \"").append(commandEventTriggers.get(commandEvents.indexOf(event)))
|
||||
.append("\")");
|
||||
}
|
||||
}
|
||||
return text.toString();
|
||||
@ -2557,13 +2559,13 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
|
||||
|
||||
@Override
|
||||
public @NotNull String getPromptText(final ConversationContext context) {
|
||||
String text = ChatColor.BOLD + "" + ChatColor.AQUA + "- ";
|
||||
final StringBuilder text = new StringBuilder(ChatColor.GOLD + "- ");
|
||||
@SuppressWarnings("unchecked")
|
||||
final
|
||||
LinkedList<String> list = (LinkedList<String>) context.getSessionData(stagePrefix + CK.S_CUSTOM_OBJECTIVES);
|
||||
final LinkedList<String> list
|
||||
= (LinkedList<String>) context.getSessionData(stagePrefix + CK.S_CUSTOM_OBJECTIVES);
|
||||
if (list != null && plugin != null) {
|
||||
final String objName = list.getLast();
|
||||
text += objName + " -\n";
|
||||
text.append(objName).append(" -\n");
|
||||
CustomObjective found = null;
|
||||
for (final CustomObjective co : plugin.getCustomObjectives()) {
|
||||
if (co.getName().equals(objName)) {
|
||||
@ -2572,10 +2574,10 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
|
||||
}
|
||||
}
|
||||
if (found != null) {
|
||||
text += ChatColor.BLUE + found.getCountPrompt() + "\n\n";
|
||||
text.append(ChatColor.YELLOW).append(found.getCountPrompt());
|
||||
}
|
||||
}
|
||||
return text;
|
||||
return text.toString();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
Loading…
Reference in New Issue
Block a user