mirror of
https://github.com/PikaMug/Quests.git
synced 2025-01-13 11:41:21 +01:00
Only accept solid blocks for Block objectives. Bump version number
This commit is contained in:
parent
7c9512aa74
commit
5ea0f9178b
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>me.blackvein.quests</groupId>
|
||||
<artifactId>quests-parent</artifactId>
|
||||
<version>3.7.3</version>
|
||||
<version>3.7.4</version>
|
||||
</parent>
|
||||
<artifactId>quests-main</artifactId>
|
||||
|
||||
|
@ -255,13 +255,14 @@ public class BlocksPrompt extends FixedSetPrompt {
|
||||
LinkedList<String> names = new LinkedList<String>();
|
||||
for (String s : args) {
|
||||
try {
|
||||
if (Material.matchMaterial(s) != null) {
|
||||
//if (names.contains(s) == false) {
|
||||
Material m = Material.matchMaterial(s);
|
||||
if (m != null) {
|
||||
if (m.isBlock()) {
|
||||
names.add(s);
|
||||
/*} else {
|
||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("listDuplicate"));
|
||||
} else {
|
||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorNotSolid"));
|
||||
return new BreakBlockNamesPrompt();
|
||||
}*/
|
||||
}
|
||||
} else {
|
||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorInvalidBlockName"));
|
||||
return new BreakBlockNamesPrompt();
|
||||
@ -472,13 +473,14 @@ public class BlocksPrompt extends FixedSetPrompt {
|
||||
LinkedList<String> names = new LinkedList<String>();
|
||||
for (String s : args) {
|
||||
try {
|
||||
if (Material.matchMaterial(s) != null) {
|
||||
//if (names.contains(s) == false) {
|
||||
Material m = Material.matchMaterial(s);
|
||||
if (m != null) {
|
||||
if (m.isBlock()) {
|
||||
names.add(s);
|
||||
/*} else {
|
||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("listDuplicate"));
|
||||
} else {
|
||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorNotSolid"));
|
||||
return new DamageBlockNamesPrompt();
|
||||
}*/
|
||||
}
|
||||
} else {
|
||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorInvalidBlockName"));
|
||||
return new DamageBlockNamesPrompt();
|
||||
@ -689,13 +691,14 @@ public class BlocksPrompt extends FixedSetPrompt {
|
||||
LinkedList<String> names = new LinkedList<String>();
|
||||
for (String s : args) {
|
||||
try {
|
||||
if (Material.matchMaterial(s) != null) {
|
||||
//if (names.contains(s) == false) {
|
||||
Material m = Material.matchMaterial(s);
|
||||
if (m != null) {
|
||||
if (m.isBlock()) {
|
||||
names.add(s);
|
||||
/*} else {
|
||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("listDuplicate"));
|
||||
} else {
|
||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorNotSolid"));
|
||||
return new PlaceBlockNamesPrompt();
|
||||
}*/
|
||||
}
|
||||
} else {
|
||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + Lang.get("stageEditorInvalidBlockName"));
|
||||
return new PlaceBlockNamesPrompt();
|
||||
@ -906,13 +909,14 @@ public class BlocksPrompt extends FixedSetPrompt {
|
||||
LinkedList<String> names = new LinkedList<String>();
|
||||
for (String s : args) {
|
||||
try {
|
||||
if (Material.matchMaterial(s) != null) {
|
||||
//if (names.contains(s) == false) {
|
||||
Material m = Material.matchMaterial(s);
|
||||
if (m != null) {
|
||||
if (m.isBlock()) {
|
||||
names.add(s);
|
||||
/*} else {
|
||||
context.getForWhom().sendRawMessage(ChatColor.RED + " " + Lang.get("listDuplicate"));
|
||||
} else {
|
||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorNotSolid"));
|
||||
return new UseBlockNamesPrompt();
|
||||
}*/
|
||||
}
|
||||
} else {
|
||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorInvalidBlockName"));
|
||||
return new UseBlockNamesPrompt();
|
||||
@ -1123,13 +1127,14 @@ public class BlocksPrompt extends FixedSetPrompt {
|
||||
LinkedList<String> names = new LinkedList<String>();
|
||||
for (String s : args) {
|
||||
try {
|
||||
if (Material.matchMaterial(s) != null) {
|
||||
//if (names.contains(s) == false) {
|
||||
Material m = Material.matchMaterial(s);
|
||||
if (m != null) {
|
||||
if (m.isBlock()) {
|
||||
names.add(s);
|
||||
/*} else {
|
||||
context.getForWhom().sendRawMessage(ChatColor.RED + " " + Lang.get("listDuplicate"));
|
||||
} else {
|
||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorNotSolid"));
|
||||
return new CutBlockNamesPrompt();
|
||||
}*/
|
||||
}
|
||||
} else {
|
||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorInvalidBlockName"));
|
||||
return new CutBlockNamesPrompt();
|
||||
|
@ -249,6 +249,7 @@ stageEditorObjectiveOverrideCleared: "Objective display override cleared."
|
||||
stageEditorDeliveryAddItem: "Add item"
|
||||
stageEditorDeliveryNPCs: "Set NPC IDs"
|
||||
stageEditorDeliveryMessages: "Set delivery messages"
|
||||
stageEditorNotSolid: "is not a solid block!"
|
||||
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