mirror of
https://github.com/PikaMug/Quests.git
synced 2024-12-22 17:17:38 +01:00
Disallow periods in quest names, fixes #87
This commit is contained in:
parent
a3efc78fe8
commit
7dd2b006ad
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
<groupId>me.blackvein.quests</groupId>
|
<groupId>me.blackvein.quests</groupId>
|
||||||
<artifactId>quests</artifactId>
|
<artifactId>quests</artifactId>
|
||||||
<version>2.6.2</version>
|
<version>2.6.3</version>
|
||||||
<name>quests</name>
|
<name>quests</name>
|
||||||
<url>https://github.com/FlyingPikachu/Quests/</url>
|
<url>https://github.com/FlyingPikachu/Quests/</url>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
@ -491,8 +491,8 @@ public class PlayerListener implements Listener, ColorUtil {
|
|||||||
|
|
||||||
if (quester.hasObjective(quest, "breakBlock")) {
|
if (quester.hasObjective(quest, "breakBlock")) {
|
||||||
|
|
||||||
if (evt.getPlayer().getItemInHand().containsEnchantment(Enchantment.SILK_TOUCH) == false && evt.isCancelled() == false) {
|
if (evt.getPlayer().getItemInHand().containsEnchantment(Enchantment.SILK_TOUCH) == false && evt.isCancelled() == false) {
|
||||||
quester.breakBlock(quest, evt.getBlock().getType());
|
quester.breakBlock(quest, evt.getBlock().getType());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -523,7 +523,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (input.contains(",")) {
|
if (input.contains(".") || input.contains(",")) {
|
||||||
|
|
||||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("questEditorInvalidQuestName"));
|
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("questEditorInvalidQuestName"));
|
||||||
return new QuestNamePrompt();
|
return new QuestNamePrompt();
|
||||||
|
@ -2085,11 +2085,11 @@ public class Quester {
|
|||||||
ConfigurationSection dataSec = data.createSection("questData");
|
ConfigurationSection dataSec = data.createSection("questData");
|
||||||
|
|
||||||
for (Quest quest : currentQuests.keySet()) {
|
for (Quest quest : currentQuests.keySet()) {
|
||||||
|
|
||||||
ConfigurationSection questSec = dataSec.createSection(quest.name);
|
ConfigurationSection questSec = dataSec.createSection(quest.name);
|
||||||
QuestData questData = getQuestData(quest);
|
QuestData questData = getQuestData(quest);
|
||||||
if (questData == null) continue;
|
if (questData == null) continue;
|
||||||
|
|
||||||
if (questData.blocksDamaged.isEmpty() == false) {
|
if (questData.blocksDamaged.isEmpty() == false) {
|
||||||
|
|
||||||
LinkedList<String> blockNames = new LinkedList<String>();
|
LinkedList<String> blockNames = new LinkedList<String>();
|
||||||
|
@ -225,7 +225,7 @@ public class Lang {
|
|||||||
//Quest create menu errors
|
//Quest create menu errors
|
||||||
langMap.put("questEditorNameExists", "A Quest with that name already exists!");
|
langMap.put("questEditorNameExists", "A Quest with that name already exists!");
|
||||||
langMap.put("questEditorBeingEdited", "Someone is creating/editing a Quest with that name!");
|
langMap.put("questEditorBeingEdited", "Someone is creating/editing a Quest with that name!");
|
||||||
langMap.put("questEditorInvalidQuestName", "Name may not contain commas!");
|
langMap.put("questEditorInvalidQuestName", "Name may not contain periods or commas!");
|
||||||
langMap.put("questEditorInvalidEventName", "is not a valid event name!");
|
langMap.put("questEditorInvalidEventName", "is not a valid event name!");
|
||||||
langMap.put("questEditorInvalidNPC", "No NPC exists with that id!");
|
langMap.put("questEditorInvalidNPC", "No NPC exists with that id!");
|
||||||
langMap.put("questEditorNoStartBlockSelected", "You must select a block first.");
|
langMap.put("questEditorNoStartBlockSelected", "You must select a block first.");
|
||||||
|
Loading…
Reference in New Issue
Block a user