mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-24 03:25:20 +01:00
Fix loading of quest requirements with color-coded names, fixes #1198
This commit is contained in:
parent
db030a6f12
commit
85d8131c34
@ -822,7 +822,7 @@ public class Quest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if quester is in WorldGuard region
|
* Checks if quester is in WorldGuard region start
|
||||||
*
|
*
|
||||||
* @param quester The quester to check
|
* @param quester The quester to check
|
||||||
* @return true if quester is in region
|
* @return true if quester is in region
|
||||||
@ -832,7 +832,7 @@ public class Quest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if player is in WorldGuard region
|
* Checks if player is in WorldGuard region start
|
||||||
*
|
*
|
||||||
* @param player The player to check
|
* @param player The player to check
|
||||||
* @return true if player is in region
|
* @return true if player is in region
|
||||||
|
@ -1682,8 +1682,10 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
|
|||||||
List<String> temp = new LinkedList<String>();
|
List<String> temp = new LinkedList<String>();
|
||||||
for (String name : names) {
|
for (String name : names) {
|
||||||
boolean done = false;
|
boolean done = false;
|
||||||
for (String string : questsSection.getKeys(false)) {
|
for (String id : questsSection.getKeys(false)) {
|
||||||
if (config.getString("quests." + string + ".name").equalsIgnoreCase(name)) {
|
String name2 = config.getString("quests." + id + ".name");
|
||||||
|
if (name2.equalsIgnoreCase(name)
|
||||||
|
|| ChatColor.stripColor(name2).equalsIgnoreCase(ChatColor.stripColor(name))) {
|
||||||
temp.add(name);
|
temp.add(name);
|
||||||
done = true;
|
done = true;
|
||||||
break;
|
break;
|
||||||
@ -1711,8 +1713,10 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
|
|||||||
List<String> temp = new LinkedList<String>();
|
List<String> temp = new LinkedList<String>();
|
||||||
for (String name : names) {
|
for (String name : names) {
|
||||||
boolean done = false;
|
boolean done = false;
|
||||||
for (String string : questsSection.getKeys(false)) {
|
for (String id : questsSection.getKeys(false)) {
|
||||||
if (config.getString("quests." + string + ".name").equalsIgnoreCase(name)) {
|
String name2 = config.getString("quests." + id + ".name");
|
||||||
|
if (name2.equalsIgnoreCase(name)
|
||||||
|
|| ChatColor.stripColor(name2).equalsIgnoreCase(ChatColor.stripColor(name))) {
|
||||||
temp.add(name);
|
temp.add(name);
|
||||||
done = true;
|
done = true;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user