mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-27 13:15:55 +01:00
Allow duplicate material types per obj pending results, fixes #680
This commit is contained in:
parent
223fa4badf
commit
3dc397921c
@ -256,12 +256,12 @@ public class BlocksPrompt extends FixedSetPrompt {
|
||||
for (String s : args) {
|
||||
try {
|
||||
if (Material.matchMaterial(s) != null) {
|
||||
if (names.contains(s) == false) {
|
||||
//if (names.contains(s) == false) {
|
||||
names.add(s);
|
||||
} else {
|
||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("stageEditorContainsDuplicates"));
|
||||
/*} else {
|
||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("stageEditorListContainsDuplicates"));
|
||||
return new BreakBlockNamesPrompt();
|
||||
}
|
||||
}*/
|
||||
} else {
|
||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorInvalidBlockName"));
|
||||
return new BreakBlockNamesPrompt();
|
||||
@ -473,12 +473,12 @@ public class BlocksPrompt extends FixedSetPrompt {
|
||||
for (String s : args) {
|
||||
try {
|
||||
if (Material.matchMaterial(s) != null) {
|
||||
if (names.contains(s) == false) {
|
||||
//if (names.contains(s) == false) {
|
||||
names.add(s);
|
||||
} else {
|
||||
/*} else {
|
||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("stageEditorListContainsDuplicates"));
|
||||
return new DamageBlockNamesPrompt();
|
||||
}
|
||||
}*/
|
||||
} else {
|
||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorInvalidBlockName"));
|
||||
return new DamageBlockNamesPrompt();
|
||||
@ -690,12 +690,12 @@ public class BlocksPrompt extends FixedSetPrompt {
|
||||
for (String s : args) {
|
||||
try {
|
||||
if (Material.matchMaterial(s) != null) {
|
||||
if (names.contains(s) == false) {
|
||||
//if (names.contains(s) == false) {
|
||||
names.add(s);
|
||||
} else {
|
||||
/*} else {
|
||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("stageEditorListContainsDuplicates"));
|
||||
return new PlaceBlockNamesPrompt();
|
||||
}
|
||||
}*/
|
||||
} else {
|
||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + Lang.get("stageEditorInvalidBlockName"));
|
||||
return new PlaceBlockNamesPrompt();
|
||||
@ -907,12 +907,12 @@ public class BlocksPrompt extends FixedSetPrompt {
|
||||
for (String s : args) {
|
||||
try {
|
||||
if (Material.matchMaterial(s) != null) {
|
||||
if (names.contains(s) == false) {
|
||||
//if (names.contains(s) == false) {
|
||||
names.add(s);
|
||||
} else {
|
||||
context.getForWhom().sendRawMessage(ChatColor.RED + " " + Lang.get("stageEditorContainsDuplicates"));
|
||||
/*} else {
|
||||
context.getForWhom().sendRawMessage(ChatColor.RED + " " + Lang.get("stageEditorListContainsDuplicates"));
|
||||
return new UseBlockNamesPrompt();
|
||||
}
|
||||
}*/
|
||||
} else {
|
||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorInvalidBlockName"));
|
||||
return new UseBlockNamesPrompt();
|
||||
@ -1124,12 +1124,12 @@ public class BlocksPrompt extends FixedSetPrompt {
|
||||
for (String s : args) {
|
||||
try {
|
||||
if (Material.matchMaterial(s) != null) {
|
||||
if (names.contains(s) == false) {
|
||||
//if (names.contains(s) == false) {
|
||||
names.add(s);
|
||||
} else {
|
||||
/*} else {
|
||||
context.getForWhom().sendRawMessage(ChatColor.RED + " " + Lang.get("stageEditorListContainsDuplicates"));
|
||||
return new CutBlockNamesPrompt();
|
||||
}
|
||||
}*/
|
||||
} else {
|
||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorInvalidBlockName"));
|
||||
return new CutBlockNamesPrompt();
|
||||
|
@ -283,12 +283,12 @@ public class ItemsPrompt extends FixedSetPrompt {
|
||||
for (String s : args) {
|
||||
try {
|
||||
if (Material.matchMaterial(s) != null) {
|
||||
if (names.contains(s) == false) {
|
||||
//if (names.contains(s) == false) {
|
||||
names.add(s);
|
||||
} else {
|
||||
/*} else {
|
||||
context.getForWhom().sendRawMessage(ChatColor.RED + " " + Lang.get("stageEditorListContainsDuplicates"));
|
||||
return new EnchantItemsPrompt();
|
||||
}
|
||||
}*/
|
||||
} else {
|
||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorInvalidItemName"));
|
||||
return new EnchantItemsPrompt();
|
||||
|
@ -237,7 +237,6 @@ stageEditorObjectiveOverrideCleared: "Objective display override cleared."
|
||||
stageEditorDeliveryAddItem: "Add item"
|
||||
stageEditorDeliveryNPCs: "Set NPC IDs"
|
||||
stageEditorDeliveryMessages: "Set delivery messages"
|
||||
stageEditorContainsDuplicates: "List contains duplicates!"
|
||||
stageEditorInvalidBlockName: "is not a valid block name!"
|
||||
stageEditorInvalidEnchantment: "is not a valid enchantment name!"
|
||||
stageEditorInvalidNPC: "is not a valid NPC ID!"
|
||||
|
Loading…
Reference in New Issue
Block a user