Allow duplicate material types per obj pending results, fixes #680

This commit is contained in:
BuildTools 2019-02-05 13:48:26 -05:00
parent 223fa4badf
commit 3dc397921c
3 changed files with 20 additions and 21 deletions

View File

@ -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();

View File

@ -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();

View File

@ -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!"