mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-06 16:27:59 +01:00
Lets recognize quests with multiple words
This commit is contained in:
parent
dc85541107
commit
9b068c306c
@ -14,6 +14,7 @@ import com.gamingmesh.jobs.container.JobsPlayer;
|
|||||||
import com.gamingmesh.jobs.container.Quest;
|
import com.gamingmesh.jobs.container.Quest;
|
||||||
import com.gamingmesh.jobs.container.QuestProgression;
|
import com.gamingmesh.jobs.container.QuestProgression;
|
||||||
import com.gamingmesh.jobs.economy.BufferedEconomy;
|
import com.gamingmesh.jobs.economy.BufferedEconomy;
|
||||||
|
import com.gamingmesh.jobs.stuff.Debug;
|
||||||
|
|
||||||
public class skipquest implements Cmd {
|
public class skipquest implements Cmd {
|
||||||
|
|
||||||
@ -27,7 +28,7 @@ public class skipquest implements Cmd {
|
|||||||
|
|
||||||
JobsPlayer jPlayer = null;
|
JobsPlayer jPlayer = null;
|
||||||
Job job = null;
|
Job job = null;
|
||||||
String questName = null;
|
String questName = "";
|
||||||
|
|
||||||
for (String one : args) {
|
for (String one : args) {
|
||||||
if (job == null) {
|
if (job == null) {
|
||||||
@ -41,7 +42,9 @@ public class skipquest implements Cmd {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
questName = one;
|
if (!questName.isEmpty())
|
||||||
|
questName += " ";
|
||||||
|
questName += one;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (jPlayer == null && sender instanceof Player)
|
if (jPlayer == null && sender instanceof Player)
|
||||||
@ -65,7 +68,7 @@ public class skipquest implements Cmd {
|
|||||||
Quest old = null;
|
Quest old = null;
|
||||||
|
|
||||||
for (QuestProgression one : quests) {
|
for (QuestProgression one : quests) {
|
||||||
if (one.getQuest().getConfigName().equalsIgnoreCase(questName)) {
|
if (one.getQuest().getQuestName().equalsIgnoreCase(questName) || one.getQuest().getConfigName().equalsIgnoreCase(questName)) {
|
||||||
old = one.getQuest();
|
old = one.getQuest();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -82,8 +85,9 @@ public class skipquest implements Cmd {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Jobs.getGCManager().getDailyQuestsSkips() <= jPlayer.getSkippedQuests())
|
if (Jobs.getGCManager().getDailyQuestsSkips() <= jPlayer.getSkippedQuests()) {
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
double amount = Jobs.getGCManager().skipQuestCost;
|
double amount = Jobs.getGCManager().skipQuestCost;
|
||||||
BufferedEconomy econ = Jobs.getEconomy();
|
BufferedEconomy econ = Jobs.getEconomy();
|
||||||
|
@ -95,7 +95,8 @@ public class ConfigManager {
|
|||||||
cfg.addComment(pt + ".FullDescription", "Full description of job to be shown in job browse command");
|
cfg.addComment(pt + ".FullDescription", "Full description of job to be shown in job browse command");
|
||||||
cfg.get(pt + ".FullDescription", Arrays.asList("&2Get money for:", " &7Planting trees", " &7Cutting down trees", " &7Killing players"));
|
cfg.get(pt + ".FullDescription", Arrays.asList("&2Get money for:", " &7Planting trees", " &7Cutting down trees", " &7Killing players"));
|
||||||
|
|
||||||
cfg.addComment(pt + ".ChatColour", "The colour of the name, for a full list of supported colours, go to the message config.");
|
cfg.addComment(pt + ".ChatColour",
|
||||||
|
"The colour of the name, for a full list of supported colours, go to the message config. Hex color codes are supported as of 1.16 minecraft version. Example: {#6600cc} or {#Brown}");
|
||||||
cfg.get(pt + ".ChatColour", "GREEN");
|
cfg.get(pt + ".ChatColour", "GREEN");
|
||||||
|
|
||||||
cfg.addComment(pt + ".BossBarColour", "[OPTIONAL] The colour of the boss bar: GREEN, BLUE, RED, WHITE, YELLOW, PINK, PURPLE.");
|
cfg.addComment(pt + ".BossBarColour", "[OPTIONAL] The colour of the boss bar: GREEN, BLUE, RED, WHITE, YELLOW, PINK, PURPLE.");
|
||||||
|
@ -38,6 +38,7 @@ import com.gamingmesh.jobs.Signs.SignTopType;
|
|||||||
import com.gamingmesh.jobs.dao.JobsDAO;
|
import com.gamingmesh.jobs.dao.JobsDAO;
|
||||||
import com.gamingmesh.jobs.economy.PaymentData;
|
import com.gamingmesh.jobs.economy.PaymentData;
|
||||||
import com.gamingmesh.jobs.resources.jfep.Parser;
|
import com.gamingmesh.jobs.resources.jfep.Parser;
|
||||||
|
import com.gamingmesh.jobs.stuff.Debug;
|
||||||
import com.gamingmesh.jobs.stuff.FurnaceBrewingHandling;
|
import com.gamingmesh.jobs.stuff.FurnaceBrewingHandling;
|
||||||
import com.gamingmesh.jobs.stuff.TimeManage;
|
import com.gamingmesh.jobs.stuff.TimeManage;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user